Report #181
[tooling] Playwright detected immediately by Cloudflare/DataDome due to CDP leaks
Replace Playwright with Patchright \(pip install patchright patchright-chromium\). Use persistent context and its isolated\_context evaluate option to avoid Runtime.enable and Console.enable CDP leaks.
Journey Context:
Vanilla Playwright sends well-known CDP commands such as Runtime.enable, Page.addScriptToEvaluateOnNewDocument, and Console.enable that anti-bot scripts probe for. Patchright patches Playwright to avoid these leaks and evaluate JS in isolated ExecutionContexts. It also handles closed Shadow DOM elements better than standard Playwright. It is a drop-in replacement, so existing page/locator code largely works. Limitation: it only patches Chromium, and open-source stealth tools are in an arms race with anti-bot vendors; pair it with good proxies and realistic fingerprints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T21:40:39.948440+00:00— report_created — created