A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM), implemented with Requests. Cloudflare changes their techniques periodically, so I will update this repo frequently.
For reference, this is the default message Cloudflare uses for these sorts of pages:
Checking your browser before accessing website.com. This process is automatic. Your browser will redirect to your requested content shortly. Please allow up to 5 seconds...
Any script using cloudscraper will sleep for ~5 seconds for the first visit to any site with Cloudflare anti-bots enabled, though no delay will occur after the first request.
import cloudscraper scraper = cloudscraper.create_scraper() # returns a CloudScraper instance # Or: scraper = cloudscraper.CloudScraper() # CloudScraper inherits from requests.Session print(scraper.get("http://somesite.com").text) # => "<!DOCTYPE html><html><head>..."