爬虫绕过cloudflare验证

换另外一个python库:cloudflare-scrape

  • pip install cfscrape
import cfscrape

scraper = cfscrape.create_scraper()  # returns a CloudflareScraper instance
# Or: scraper = cfscrape.CloudflareScraper()  # CloudflareScraper inherits from requests.Session
print(scraper.get("http://...",headers={‘user-agent‘:‘...‘}).text)  # => "<!DOCTYPE html><html><head>..."

tip:




爬虫绕过cloudflare验证

上一篇:LeetCode 1-5题解


下一篇:转:解决electron 消息通知在win10下不显示问题