MyGit

puppeteer/puppeteer

Fork: 9319 Star: 92810 (更新于 2025-11-08 19:31:40)

license: Apache-2.0

Language: TypeScript .

JavaScript API for Chrome and Firefox

最后发布版本: puppeteer-core-v24.29.1 ( 2025-11-07 01:51:11)

官方网址 GitHub网址

Puppeteer

build npm puppeteer package

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});

// Open the search menu using the keyboard.
await page.keyboard.press('/');

// Type into search box using accessible input name.
await page.locator('::-p-aria(Search)').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('::-p-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();

最近版本更新:(数据更新于 2025-11-08 19:31:24)

2025-11-07 01:51:11 puppeteer-core-v24.29.1

2025-11-07 01:51:10 puppeteer-v24.29.1

2025-11-05 18:11:07 puppeteer-core-v24.29.0

2025-11-05 18:11:06 puppeteer-v24.29.0

2025-11-03 19:56:18 browsers-v2.10.13

2025-11-03 19:56:17 puppeteer-core-v24.28.0

2025-11-03 19:56:16 puppeteer-v24.28.0

2025-10-29 15:38:05 puppeteer-core-v24.27.0

2025-10-29 15:38:04 puppeteer-v24.27.0

2025-10-23 18:27:08 puppeteer-core-v24.26.1

主题(topics):

developer-tools web automation chrome testing chromium firefox headless-chrome node-module

puppeteer/puppeteer同语言 TypeScript最近更新仓库

2025-11-09 19:51:08 lobehub/lobe-chat

2025-11-08 21:28:27 adonisjs/core

2025-11-08 19:44:57 clash-verge-rev/clash-verge-rev

2025-11-08 17:58:09 fuma-nama/fumadocs

2025-11-08 15:00:33 x-extends/vxe-table

2025-11-08 12:30:05 NapNeko/NapCatQQ