Clear Cloudflare challenges in Python by driving the Scrapeless anti-detection cloud browser over CDP: real Chromium, a consistent per-session fingerprint, and residential egress in 195+ countries — standard Playwright for Python, one connection URL.
Cloudflare scores the browser, not the visitor — fingerprint consistency, behavioral signals, and exit-IP reputation — then sets a cf_clearance cookie for a browser it trusts. The cloud browser clears the challenge during render; you just wait for the real content.
| Local Python browser | Scrapeless cloud browser | |
|---|---|---|
| Fingerprint | headless defaults + webdriver flag |
consistent, per-session, no tell |
| Exit IP | your own (often datacenter) | residential in 195+ countries |
| Cloudflare challenge | stalls / interstitial | cleared during render, cf_clearance set |
| Your code | works | works, unchanged — just the connection URL |
pip install playwright
export SCRAPELESS_API_KEY=sk_... # free key at https://app.scrapeless.com
python examples/cloudflare.pyA live run prints cleared: You bypassed the Cloudflare challenge! :D and cf_clearance: True.
examples/cloudflare.py — connect with chromium.connect_over_cdp(), wait for the post-challenge content, confirm the cf_clearance cookie.
Everything is a query parameter on wss://browser.scrapeless.com/api/v2/browser — token, sessionTTL (seconds), proxyCountry. Cloudflare scores the exit IP, so pin proxyCountry to a residential region.
MIT — see LICENSE. Access publicly available data in line with the site's terms and applicable law. Requires a free API key from app.scrapeless.com.