puppeteer/puppeteer
Fork: 9102 Star: 89076 (更新于 2024-12-13 11:16:24)
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-21 21:40:12 lobehub/lobe-chat
2024-12-21 12:01:51 siyuan-note/siyuan
2024-12-21 10:57:01 ai16z/eliza
2024-12-21 09:15:35 MetaCubeX/metacubexd
2024-12-21 04:50:26 mediar-ai/screenpipe
2024-12-20 19:36:48 vitejs/vite