Introduction
Puppeteer Extra wraps the standard Puppeteer API with a plugin system. Its most popular plugin, puppeteer-extra-plugin-stealth, patches multiple browser fingerprints to make automated Chrome sessions indistinguishable from manual browsing.
What Puppeteer Extra Does
- Adds a plugin pipeline that hooks into Puppeteer browser and page lifecycle events
- Patches WebGL, WebRTC, navigator, and Chrome runtime fingerprints via the stealth plugin
- Blocks ads and trackers with the adblocker plugin using the same engine as uBlock Origin
- Solves reCAPTCHA challenges automatically with the recaptcha plugin
- Persists user data directories and cookies across sessions
Architecture Overview
Puppeteer Extra intercepts Puppeteer's launch and connect methods, running each registered plugin's onBrowser and onPageCreated hooks. The stealth plugin applies a set of evasion modules (chrome.runtime, navigator.webdriver, iframe.contentWindow) via page.evaluateOnNewDocument calls before any page script executes.
Self-Hosting & Configuration
- Install puppeteer-extra alongside regular puppeteer
- Add plugins via puppeteer.use() before calling launch()
- Configure stealth evasions individually if defaults are too aggressive
- Use the adblocker plugin with blocker lists for faster page loads
- Works with puppeteer-core for custom Chrome/Chromium binaries
Key Features
- Drop-in Puppeteer replacement with full API compatibility
- Stealth plugin passes all major bot detection test suites
- Modular plugin architecture for composing functionality
- Supports both Puppeteer and Playwright via playwright-extra
- Active community maintaining evasion updates as detection evolves
Comparison with Similar Tools
- Puppeteer — Standard API without stealth; puppeteer-extra adds anti-detection
- undetected-chromedriver — Python Selenium-based; puppeteer-extra is Node.js-native
- Playwright — Multi-browser support; puppeteer-extra focuses on Chrome stealth
- Crawlee — High-level scraping framework; puppeteer-extra operates at the driver level
- Browser Use — AI-driven automation; puppeteer-extra provides programmatic control
FAQ
Q: Does the stealth plugin guarantee passing all bot detection? A: It passes most fingerprint checks, but behavioral analysis (mouse patterns, timing) may still trigger detection.
Q: Can I use it with Playwright instead of Puppeteer? A: Yes. The playwright-extra package provides the same plugin system for Playwright.
Q: Does it work in headless mode? A: Yes. The stealth plugin specifically targets headless detection evasion.
Q: How do I add multiple plugins? A: Call puppeteer.use() for each plugin before launching the browser.