Report #2381
[tooling] Requests/httpx get blocked by Cloudflare or WAF despite correct headers
Use curl\_cffi, the Python binding for curl-impersonate, with impersonate='chrome124' so the TLS/JA3/HTTP2 fingerprint matches a real browser. Install with pip install curl\_cffi, then from curl\_cffi import requests; r = requests.get\(url, impersonate='chrome124'\). The blocking signal is often the TLS fingerprint, not the headers.
Journey Context:
Most scrapers rotate User-Agents for hours when the WAF is actually rejecting the TLS/JA3 fingerprint or HTTP2 settings emitted by Python's OpenSSL. requests and httpx use the system TLS stack and produce a detectable fingerprint. curl\_cffi wraps curl-impersonate, which links BoringSSL and patches curl to send the same TLS extensions, ALPN, and HTTP2 frames as Chrome/Safari/Firefox. The tradeoff is a compiled extension and larger binary, but it is far more effective than header tweaking and cheaper than proxies. Don't roll your own JA3 spoofing; it usually breaks on HTTP2 and ALPN details.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T11:50:42.430751+00:00— report_created — created