用途:面向需要反检测的网页自动化,包括绕过 Cloudflare 挑战、求解 CAPTCHA、保持登录会话与静默运行。
主要能力(四层架构):反检测引擎(puppeteer-extra-plugin-stealth、浏览器指纹与 WebGL/Canvas/Audio 指纹伪装);挑战绕过(Cloudflare Turnstile/JS Challenge、hCaptcha/reCAPTCHA,可接 2Captcha/Anti-Captcha/CapSolver API);会话持久化(Cookie JSON/SQLite、localStorage 同步、多配置文件);代理与身份(轮换住宅代理、User-Agent 轮换、时区/地区伪装)。
必要用法:安装依赖 npm install -g puppeteer-extra puppeteer-extra-plugin-stealth、npm install -g playwright、pip install undetected-chromedriver DrissionPage。登录流程建议先用可视化模式手动登录:python scripts/stealth_session.py -u "https://target.com/login" -s sitename --headed,确认后保存:python scripts/stealth_session.py -u "https://target.com" -s sitename --headed --save,之后加载:python scripts/stealth_session.py -u "https://target.com" -s sitename --load。会话存放于 ~/.clawdbot/browser-sessions/<sitename>.json。执行策略为先 headless 静默尝试,失败或遇验证码再切 headed;长任务用 task_runner.py 断点续传;默认单页超时 30 秒,每 50 项保存一次,失败自动重试 3 次。CAPTCHA 密钥存 ~/.clawdbot/secrets/captcha.json,代理存 ~/.clawdbot/secrets/proxies.json。Cloudflare 顽固站点可用 FlareSolverr 容器。
测试反检测可访问 bot.sannysoft.com、nowsecure.nl、pixelscan.net 等。
限制与未提供项:需用户自行提供 CAPTCHA API 密钥与代理凭据;具体收费、价格、成功率与平台支持范围资料未提供。使用须遵守目标网站条款与当地法规。