playwright-bot-bypass
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "playwright-bot-bypass":https://skillpi.com/zh/skills/deepskill-74441763b1c39628313edb344634fb79fffe584ba5c7cb3a300c0645809c6a4e。安装前核对上游来源和版本:https://github.com/greekr4/playwright-bot-bypass。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
playwright-bot-bypass 在用户要求“绕过机器人检测”“避免验证码”“隐身浏览器自动化”“未被检测到的Playwright”“绕过Google机器人检查”“rebrowser-playwright”或需要对会检测并屏蔽机器人的网站进行自动化时使用。
介绍来源: third_party · greekr4 · 2.2.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: playwright-bot-bypass
description: This skill should be used when the user asks to "bypass bot detection", "avoid CAPTCHA", "stealth browser automation", "undetected playwright", "bypass Google bot check", "rebrowser-playwright", or needs to automate websites that detect and block bots.
version: 2.2.0Playwright Bot Bypass
Reduce bot detection using rebrowser-playwright + real headed Chrome. Passes fingerprint checkers (bot.sannysoft.com, areyouheadless) and avoids triggering CAPTCHAs on Google. Not a guaranteed bypass for CDP/runtime-aware enterprise bot managers — see "Detection Coverage" for measured results.
Authorized use only. This is for QA, accessibility testing, and research on sites you own or are permitted to test. Respect each site's Terms of Service,
robots.txt, and applicable law. Do not use it to bypass paywalls, abuse rate limits, or scrape against a site's stated wishes.
How Detection Is Defeated (and by which layer)
Evasion comes from three layers, not one — most of it is the real browser, not hand-written JS:
| Detection Point | Standard Playwright (headless) | Defeated by |
|---|---|---|
CDP / Runtime.enable leak |
Present (headless tell) | rebrowser + REBROWSER_PATCHES_RUNTIME_FIX_MODE (auto-set) |
window.__pwInitScripts (isPlaywright) |
Present | artifact strip (init script deletes it every nav) |
navigator.webdriver |
true |
rebrowser (reports false; we do NOT delete it — undefined is itself a tell) |
| WebGL Renderer | SwiftShader (software) | channel:'chrome' + headed mode (real GPU) |
| User Agent | Contains "HeadlessChrome" | channel:'chrome' (real Chrome UA) — no JS override |
| Canvas fingerprint | Software-rendered tell | headed real Chrome (genuine GPU canvas) — no JS noise |
navigator.plugins |
Empty array | headed real Chrome (genuine PluginArray) — no JS fake |
navigator.languages |
['en-US'] only |
locale option (native, worker-consistent — no JS getter) |
Why so little hand-written JS? Across v2.1/v2.2 the old fake-PluginArray, canvas-noise, hardcoded-
hardwareConcurrency, permissions-override,webdriverdelete, andnavigator.languagesgetter were all removed — every one created a detectable inconsistency (own-property tells, worker mismatches,undefinedwebdriver, anIllegal invocationcrash). v2.2 keeps exactly two active measures: strip Playwright's__pwInitScriptsartifact, and enable rebrowser's Runtime-fix. Everything else is the genuine, self-consistent real browser. Less faking = more consistent = harder to detect.
Prerequisites
- Node.js 18+ with ESM support (
.mjsfiles) - Google Chrome installed (not just Chromium)
- Headed mode required (
headless: false) — no display = no stealth
Verify Chrome is installed:
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
# Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" --version
# Linux
google-chrome --version
Quick Start
1. Install
npm init -y && npm install rebrowser-playwright
2. Create stealth-test.mjs
import os from 'node:os';
import path from 'node:path';
// Enable rebrowser's Runtime.enable fix BEFORE importing the library.
process.env.REBROWSER_PATCHES_RUNTIME_FIX_MODE ??= 'addBinding';
const { chromium } = await import('rebrowser-playwright');
const browser = await chromium.launch({
headless: false, // headed = real GPU/canvas
channel: 'chrome', // real Chrome = real UA/WebGL/plugins
args: ['--disable-blink-features=AutomationControlled']
});
// `locale` sets navigator.languages + Accept-Language natively & consistently.
const context = await browser.newContext({ locale: 'ko-KR' });
// The ONLY init script: strip Playwright's main-world signature. Touch NOTHING
// on navigator — the real browser's values are already genuine & consistent.
await context.addInitScript(() => {
for (const k of Object.getOwnPropertyNames(window)) {
if (/^__pw|pwInitScripts|playwright/i.test(k)) {
try { delete window[k]; } catch {}
}
}
if (!window.chrome) window.chrome = {};
});
const page = await context.newPage();
try {
await page.goto('https://bot.sannysoft.com', { waitUntil: 'networkidle' });
const out = path.join(os.tmpdir(), 'stealth-test.png');
await page.screenshot({ path: out });
console.log(`Screenshot saved: ${out}`);
} finally {
await browser.close();
}
3. Run
node stealth-test.mjs
Using the Template (Recommended)
The scripts/stealth-template.mjs provides a reusable factory with all patches pre-applied:
import { createStealthBrowser, humanDelay, humanType, simulateMouseMovement } from './scripts/stealth-template.mjs';
const { browser, page } = await createStealthBrowser();
try {
await page.goto('https://example.com');
// Human-like mouse movement (avoids Cloudflare Turnstile)
await simulateMouseMovement(page);
// Human-like typing instead of instant fill
await humanType(page, 'input[name="q"]', 'search query');
await humanDelay(300, 800);
} finally {
await browser.close();
}
Template Options
const { browser, context, page } = await createStealthBrowser({
headless: false, // Required for stealth (default)
viewport: { width: 1280, height: 800 }, // Default
locale: 'ko-KR', // Browser locale (default)
userAgent: null, // Custom UA (optional; default = real Chrome UA)
storageState: './session.json', // Cookie persistence (optional)
proxy: { server: 'http://proxy:8080' }, // Proxy (optional)
noSandbox: false // Opt-in --no-sandbox (Linux root/CI only; it's a bot signal)
});
// Save session for reuse
import { saveSession } from './scripts/stealth-template.mjs';
await saveSession(context, './session.json');
What the Template Actually Does
The template (v2.2) keeps the active surface to exactly two measures:
| Measure | Why |
|---|---|
Strip window.__pwInitScripts / __playwright* (init script, every nav) |
Removes the deterministic isPlaywright signature detectors key on |
REBROWSER_PATCHES_RUNTIME_FIX_MODE=addBinding (auto-set before import) |
Hides the CDP Runtime.enable headless leak |
It touches nothing on navigator. Everything else is delegated to the real browser (channel:'chrome' + headed): genuine User-Agent, WebGL/GPU renderer, canvas fingerprint, PluginArray, self-consistent permission/hardware values, and (via the locale option) native worker-consistent navigator.languages + Accept-Language.
Removed across v2.1/v2.2 (each was net-negative — faked values inconsistently with the real environment): fake navigator.plugins, canvas getImageData noise, hardcoded hardwareConcurrency/deviceMemory, outerWidth/Height offset, the permissions override (crashed with Illegal invocation), the navigator.webdriver delete (made it undefined — a tell), and the navigator.languages getter (own-property + worker-mismatch tells).
Launch arg: --disable-blink-features=AutomationControlled. --no-sandbox is opt-in ({ noSandbox: true }) — it is both a security risk and an automation signal, so it is off by default.
Heavy SPAs (TikTok/IG/FB) may print non-fatal
[rebrowser-patches] cannot get worldwarnings underaddBindingmode — the page still loads. Switch toREBROWSER_PATCHES_RUNTIME_FIX_MODE=alwaysIsolatedto silence them if needed.
Scripts
scripts/stealth-template.mjs— Reusable stealth browser factory (all examples import this)scripts/bot-detection-test.mjs— Verify bypass at bot.sannysoft.com
Examples
examples/stealth-google-search.mjs— Google search without CAPTCHAexamples/ab-test.mjs— Side-by-side detected vs stealth comparisonexamples/stealth-twitter-scrape.mjs— Twitter/X profile scraping
Note:
ab-test.mjsrequires bothrebrowser-playwrightANDplaywright:npm install rebrowser-playwright playwright && npx playwright install chromium
All screenshots are saved to the OS temp directory (os.tmpdir()) — /tmp on macOS/Linux, %TEMP% on Windows.
Detection Coverage (measured 2026-06-10, macOS headed Chrome, v2.2)
Honest, tested results. v2.2's artifact-strip + Runtime-fix flipped every fingerprint/automation detector to pass:
| Detector | Result | Note |
|---|---|---|
| bot.sannysoft.com | ✅ all green | webdriver false, real WebGL/UA/plugins |
| arh.antoinevastel.com/bots/areyouheadless | ✅ "not Chrome headless" | |
| hmaker.github.io/selenium-detector | ✅ "Passing" | no chromedriver |
| bot-detector.rebrowser.net | ✅ 0 red | __pwInitScripts stripped, no Runtime leak, webdriver false |
| deviceandbrowserinfo.com/are_you_a_bot | ✅ "You are human!" | isBot:false, isPlaywright:false |
| browserscan.net/bot-detection | ✅ "Normal" | CDP test passes (Runtime-fix) |
| iphey.com | ✅ "Trustworthy" | was "Unreliable" before v2.2 |
| creepjs | ✅ 0% headless / 0% stealth | fuzzy "38% like headless" is not a detection |
| nowsecure.nl (Cloudflare Turnstile) | ⚠️ interactive challenge shown | behavioral/IP gate — not a fingerprint check; not auto-passed |
Reliability: 9/9 repeat runs clean (the __pwInitScripts strip held across every navigation).
How v2.2 achieves this (and the one thing it can't fix)
Two levers, both built into createStealthBrowser():
- Artifact strip — an init script deletes
window.__pwInitScripts/__playwright*(the deterministicisPlaywrightsignature) on every navigation. REBROWSER_PATCHES_RUNTIME_FIX_MODE=addBinding— set automatically before import; hides the CDPRuntime.enableleak.
The residual leak: window.__playwright_builtins__ is a separate, non-configurable Playwright global that cannot be deleted or redefined. None of the detectors above key on it today, but a future detector could. No rebrowser version (you're on the latest, 1.52.0) removes it — tracked upstream in rebrowser-patches#110, open with no fix.
Takeaway: clean against fingerprint + automation-framework detection. Still not a guaranteed bypass for behavioral/IP systems (Cloudflare Turnstile, DataDome, Kasada) or login walls. For those, add residential IPs + real interaction, or switch engines — patchright (drop-in) or nodriver (structurally avoids the whole CDP/automation-protocol class).
Real community sites (single logged-out load, residential IP, 2026-06-10)
Tested whether real sites bot-block a v2.2 page load (NOT a login judgment):
| Site | Result |
|---|---|
| Reddit, YouTube, Pinterest, Threads, X (direct URL), Quora, TikTok | 🟢 content fully loaded — no bot challenge, no CAPTCHA |
| Instagram, Facebook, LinkedIn | 🟡 content shell loads behind the standard logged-out login modal — NOT a bot block / checkpoint / HTTP 999 |
Key result: none returned a bot challenge or hard block. The "hardest" sites (IG/FB/LinkedIn) served the normal logged-out human experience (a login modal over visible content), which means the stealth passed as a real user. Caveat: this is one load each on a clean residential IP. At volume, IG/FB/LinkedIn enforce datr-cookie aging, HTTP 999, and rate limits — those are IP/account problems, not fingerprint problems, and this skill does not address them. TikTok's signed-API actions (beyond profile view) also still need a warmed session.
Limitations
- Requires
headless: false(headed mode with display) - Needs real Google Chrome installed (
channel: 'chrome') - Some sites may still detect based on behavior patterns — use
humanDelay,humanType,simulateMouseMovement - Does not bypass CAPTCHAs, only prevents triggering them
- TLS/JA3 fingerprint is handled by
channel: 'chrome'(uses real Chrome binary) __pwInitScriptsleak (see Detection Coverage) is unfixable at the skill level — it's inherent to rebrowser-playwright 1.52.0
Python Support
undetected-chromedriver (Recommended)
pip install undetected-chromedriver
import undetected_chromedriver as uc
# Match your Chrome version: check chrome://version
driver = uc.Chrome() # auto-detects version
driver.get("https://www.google.com")
search_box = driver.find_element("name", "q")
search_box.send_keys("your search query")
search_box.submit()
Python
playwright-stealthonly patches at JS level — WebGL still shows SwiftShader. Useundetected-chromedriverinstead.
Alternative: Call Node.js from Python
import subprocess
result = subprocess.run(['node', 'stealth-script.mjs', query], capture_output=True)
Troubleshooting
| Problem | Fix |
|---|---|
ERR_MODULE_NOT_FOUND |
Run npm install rebrowser-playwright in the same directory as your script |
| Browser not opening | Verify Chrome is installed (see Prerequisites) |
| WebGL shows SwiftShader | You're effectively headless / GPU-less. Run headed (headless: false) with channel: 'chrome' on a machine with a real GPU; SwiftShader is the software fallback, not an import issue |
| Still getting detected | Add simulateMouseMovement() and humanDelay() between actions |
| Process hangs | Ensure browser.close() is in a finally block |
SyntaxError: await |
File must be .mjs or have "type": "module" in package.json |
版本历史
-
v2.2.2
GitHub ↗
原版更新说明
Fixes a real fingerprint leak found by expanding detection coverage beyond bot.sannysoft.com. ## Fix The default `locale: 'ko-KR'` overrode `navigator.languages` on the **main thread only** — workers kept Chrome's real language list. That main/worker mismatch made **deviceandbrowserinfo.com** report `hasInconsistentWorkerValues: true` → `isBot: true`. Locale is now unset by default (still available as an opt-in option, with a documented caveat that setting it reintroduces the worker tell). ## Verified (macOS, headed Chrome, residential IP) Fingerprint detectors: - bot.sannysoft.com — 6/6 real checks pass - bot-detector.rebrowser.net — runtime-enable leak clean - deviceandbrowserinfo.com — "human" (`isBot: false`) ✅ fixed - browserscan.net — "Normal" Real sites (initial page load): - X, Threads, Coupang, Amazon, AliExpress — load, no CAPTCHA - Instagram — expected login wall (auth wall, not a fingerprint failure) ## Scope note Verified as single-hit loads from a clean residential IP. Does NOT defeat IP-reputation, behavioral, or login walls; heavy scraping or datacenter/proxy IPs may behave differently.
-
v2.2.1
GitHub ↗
原版更新说明
Maintenance release. No behavior change to the stealth core; all bot-detection tests still pass (6/6 real checks on bot.sannysoft.com). ## Changes - **Remove redundant marketplace.json** inside `skills/playwright-bot-bypass/` — only `.claude-plugin/marketplace.json` is read by Claude Code, so the duplicate was a second, drifting source of truth. - **Bot-detection test accuracy** — WebGL Vendor/Renderer now report as `[INFO]` instead of `[PASS]`. These rows are informational on bot.sannysoft.com (never colored pass/fail), so counting them as passes overstated coverage. - **Version bump** 2.2.0 → 2.2.1. ## Verified - `npm test` → 6/6 real checks PASS, 2 INFO rows - `npm run ab-test` → standard=detected, stealth=passed
-
v2.2.0
GitHub ↗
原版更新说明
**playwright-bot-bypass** is now installable as a **Claude Code plugin** — one skill, zero config, real headed Chrome stealth. ## Install ``` /plugin marketplace add greekr4/playwright-bot-bypass /plugin install playwright-bot-bypass@playwright-bot-bypass ``` The `playwright-bot-bypass` skill is auto-discovered — no extra setup. (Still available as a standalone skill via `npx skills add greekr4/playwright-bot-bypass`.) ## What it does A one-import factory — `createStealthBrowser()` returns a ready `{ browser, page }` combining `channel:'chrome'` + headed mode + `rebrowser-playwright`'s Runtime-fix + a Playwright-artifact strip. It stitches proven upstream stealth tools into a verified recipe — and, just as important, documents which fakes *not* to add. ## Measured detection coverage (2026-06-10, macOS headed Chrome) Passes **8/8** fingerprint + automation-framework detectors, 9/9 reproducible: - ✅ bot.sannysoft.com — all green - ✅ bot-detector.rebrowser.net — 0 red - ✅ deviceandbrowserinfo.com — "You are human!" - ✅ browserscan.net — "Normal" (CDP test passes) - ✅ iphey.com — "Trustworthy" - ✅ areyouheadless, selenium-detector, creepjs **Honest scope:** clean against fingerprint/automation detection. It does **not** defeat behavioral/IP systems (Cloudflare Turnstile, DataDome), CAPTCHAs, or login walls — those are IP/account problems, not fingerprint problems. ## Node & Python - Node.js: `rebrowser-playwright` (primary, with `createStealthBrowser()` factory + human-like helpers) - Python: `undetected-chromedriver` > **Authorized use only** — for QA, accessibility testing, and research on sites you own or are permitted to test. Respect each site's ToS, `robots.txt`, and applicable law.
当前收录版本
2.2.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
待提升项
-
长尾需求定位 原报告严重程度:轻微
功能针对特定技术场景(绕过机器人检测),受众相对小众,但需求明确且解决方案完整。
改进建议:可考虑增加更多实际业务场景示例(如合规数据采集、无障碍测试)以拓宽适用面。
亮点
- 提供完整的绕过浏览器指纹检测的技术方案,包含实测数据支撑
- 明确区分指纹检测与行为/IP检测的边界,避免用户误解
- 包含端到端代码示例和模板,可直接用于合规测试场景
待提升项
-
边缘场景覆盖 原报告严重程度:轻微
对'绕过验证码'等表述可能涵盖非法用途,虽有限制说明但仍存在歧义风险。
改进建议:在触发词中更明确限定为'合规测试场景下的验证码触发规避'。
亮点
- 触发词覆盖全面,包含多种常见用户表达方式
- 通过具体短语(如'rebrowser-playwright')实现精准匹配
待提升项
-
文档长度超标 原报告严重程度:轻微
主文档超过500行,影响可读性和维护性。
改进建议:将部分技术细节(如检测覆盖表格、故障排查)移至独立参考文档。
-
缺少显式使用场景章节 原报告严重程度:轻微
未设置独立的'When to Use'章节,尽管内容已分散在描述中。
改进建议:增加显式'适用场景'章节以提升可读性。
亮点
- 结构清晰,分阶段引导用户从安装到高级使用
- 包含完整的代码示例和模板文件引用
- 明确标注版本号和更新内容
待提升项
-
无用户确认机制 原报告严重程度:轻微
直接启动可见浏览器窗口,可能对用户造成干扰。
改进建议:在快速开始示例中添加提示信息,告知用户将打开真实浏览器窗口。
亮点
- 工具来源明确(npm包),参数配置合理
- 包含完善的错误处理和资源清理(try/finally)
- 提供详细的故障排查指南和已知限制说明
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 51, 173, 231, 259 行 -
调用命令或脚本
先读脚本与参数,使用普通权限和限定目录;安装或执行前由使用工具再次确认。
主文档提及 · 第 252 行 -
截图或屏幕采集
只采集明确选择的窗口或区域,避开密码、客户资料等敏感信息,分享前再次检查。
主文档提及 · 第 89 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- bot.sannysoft.com
- example.com
- github.com
- proxy
- www.google.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。