Pages

Friday, September 29, 2017

Bypassing cloudflare using python


1. Install cfscrape


    pip install cfscrape




2. Install nodejs in OS 


    yum -y install nodejs

Ref : https://github.com/Anorov/cloudflare-scrape 

Example:

import  json,requests,bs4,cfscrape


scraper = cfscrape.create_scraper() 
session_requests = requests.session()


result=scraper.get("blockedsite,com",proxies=proxyDict)

Once bypassed then session_requests object can access the site directly





No comments:

Post a Comment