项目的 README,来自 github.com/oss-invisible/puppeteer。合并为一个 markdown 文件:README.md。
Anti-bots ask two questions, and reCAPTCHA, hCaptcha and Cloudflare Turnstile score the answers. invisible_puppeteer answers yes to both.
1. Is this a real browser? Yes. It is Firefox, patched at the C++ source level.
2. Is a real person using it? Yes. The actions are humanized in the driver.
Windows, in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "$env:USERPROFILE\.local\bin;$env:Path"
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-puppeteer
uv run invisible-puppeteer fetch
Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-puppeteer
uv run invisible-puppeteer fetch
Supported platforms: Windows x86_64 / ARM64 (the x86_64 engine, under Windows' own emulation), Linux x86_64. Linux arm64 is no longer supported from firefox-56 (firefox-55 is the last engine built for it).
Then save one of the examples below as main.py in my-project and run it with uv run main.py.
Puppeteer's API in Python, with no code changes. The same launch, Browser, Page and ElementHandle as pyppeteer, Puppeteer's Python port. If you already use it, switching is the import:
- from pyppeteer import launch
+ from invisible_puppeteer import launch
import asyncio
from invisible_puppeteer import launch
async def main():
browser = await launch()
page = await browser.newPage()
await page.goto("https://example.com")
await page.click("a") # the mouse arcs to the link
print("seed =", browser.seed) # log it to replay the run
await browser.close()
asyncio.run(main())
Every session gets a distinct fingerprint (GPU, audio, fonts, screen, ~200 fields). Do not install pyppeteer alongside it: this package already implements its API.
browser = await launch(
seed=42, # same seed, same fingerprint, every run
proxy={"server": "socks5://host:1080", "username": "u", "password": "p"},
timezone="America/New_York", # default: derived from the proxy's exit IP
pin={"screen.width": 2560, "screen.height": 1440}, # force fields, the rest stays seed-derived
headless=True, # the default: hidden desktop, real rendering, same fingerprint as headed
userDataDir="./profile", # cookies and storage survive the run
)
Proxies can be socks5, socks4, http or https, and DNS goes through them too. The viewport defaults to the fingerprint's screen size instead of Puppeteer's 800x600. The fields you can pin are the same as in invisible_playwright: pinning.
invisible-puppeteer fetch # download the engine if missing, check every cached one, print the path
invisible-puppeteer version # wrapper, core and engine versions
Switching from another tool?
The setup and the test commands are in CONTRIBUTING.md.
MIT, see LICENSE. The Juggler client it drives the browser with lives in invisible-core, which carries two files taken from Playwright's driver under Apache-2.0. The patched Firefox binary is MPL-2.0, built from oss-invisible/firefox_antidetect_patch.
This project is for educational purposes only. It is provided as-is, with no warranties. I take no responsibility for how it is used. Use it at your own risk and in compliance with the laws of your jurisdiction.
Built by Federico Elia