gitmyhub

puppeteer-extra

JavaScript ★ 7.4k updated 1y ago

💯 Teach puppeteer new tricks through plugins.

A plugin framework built on Puppeteer that lets you add capabilities like bot-detection avoidance, CAPTCHA solving, and ad blocking to automated Chrome browser sessions with a single plugin call.

JavaScriptNode.jsPuppeteerPlaywrightsetup: easycomplexity 2/5

puppeteer-extra is a plugin framework built on top of Puppeteer, a Node.js tool that controls a Chrome or Chromium browser automatically. Puppeteer lets developers write code that opens web pages, clicks buttons, fills in forms, takes screenshots, and extracts content, all without a person at the keyboard. It is widely used for testing websites, scraping data, and automating repetitive browser tasks. puppeteer-extra wraps Puppeteer with a plugin system so additional capabilities can be added cleanly without forking or modifying the core library.

The most widely used plugin included in this repository is the stealth plugin, which modifies the browser's behavior to reduce the chance that a website detects it as an automated bot rather than a real person. Other available plugins include one that handles reCAPTCHA challenges automatically, an ad blocker, and a plugin that alters the user agent string (the label a browser sends to websites to identify itself).

This GitHub repository is organized as a monorepo, meaning it holds multiple related packages in one place. The main puppeteer-extra library and each of its plugins each live in their own subfolder under the packages/ directory. The root README is intentionally brief and points to those individual packages for full documentation. New plugins can be contributed by extending a base class that the project provides.

The repository also includes playwright-extra, a companion package that brings the same plugin system to Playwright, a similar browser automation tool developed by Microsoft.

Where it fits