I am using cloudscraper to scrape a cloudflare protected url which works using:
scraper = cloudscraper.create_scraper() response = scraper.get(url).text