puppeteer/puppeteer
Fork: 9088 Star: 88873 (更新于 2024-11-20 01:10:13)
license: Apache-2.0
Language: TypeScript .
JavaScript API for Chrome and Firefox
最后发布版本: puppeteer-core-v23.7.1 ( 2024-11-07 20:48:30)
Puppeteer
Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Puppeteer runs in the headless (no visible UI) by default
Get started | API | FAQ | Contributing | Troubleshooting
Installation
npm i puppeteer # Downloads compatible Chrome during installation.
npm i puppeteer-core # Alternatively, install as a library, without downloading Chrome.
Example
import puppeteer from 'puppeteer';
// Or import puppeteer from 'puppeteer-core';
// Launch the browser and open a new blank page
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Navigate the page to a URL.
await page.goto('https://developer.chrome.com/');
// Set screen size.
await page.setViewport({width: 1080, height: 1024});
// Type into search box.
await page.locator('.devsite-search-field').fill('automate beyond recorder');
// Wait and click on first result.
await page.locator('.devsite-result-item-link').click();
// Locate the full title with a unique string.
const textSelector = await page
.locator('text/Customize and automate')
.waitHandle();
const fullTitle = await textSelector?.evaluate(el => el.textContent);
// Print the full title.
console.log('The title of this blog post is "%s".', fullTitle);
await browser.close();
最近版本更新:(数据更新于 2024-11-08 20:24:23)
2024-11-07 20:48:30 puppeteer-core-v23.7.1
2024-11-07 20:48:29 puppeteer-v23.7.1
2024-11-04 20:29:24 browsers-v2.4.1
2024-11-04 20:29:24 puppeteer-core-v23.7.0
2024-11-04 20:29:23 puppeteer-v23.7.0
2024-10-28 22:49:45 puppeteer-core-v23.6.1
2024-10-28 22:49:45 puppeteer-v23.6.1
2024-10-16 23:24:42 puppeteer-core-v23.6.0
2024-10-16 23:24:41 puppeteer-v23.6.0
2024-10-11 13:55:53 puppeteer-core-v23.5.3
主题(topics):
automation, chrome, chromium, developer-tools, firefox, headless-chrome, node-module, testing, web
puppeteer/puppeteer同语言 TypeScript最近更新仓库
2024-12-12 04:28:01 CopilotKit/CopilotKit
2024-12-11 22:48:03 labring/FastGPT
2024-12-11 15:49:47 lobehub/lobe-chat
2024-12-11 10:13:31 continuedev/continue
2024-12-11 06:06:11 RSSNext/Follow
2024-12-10 15:44:42 x-extends/vxe-table