Skip to content

Instantly share code, notes, and snippets.

@kaushikgandhi
Last active November 19, 2022 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaushikgandhi/b3221f4735214680bcd31b4b6cbf2e8c to your computer and use it in GitHub Desktop.
Save kaushikgandhi/b3221f4735214680bcd31b4b6cbf2e8c to your computer and use it in GitHub Desktop.
Bypass Cloudflare Protected site
##Scrape_Clouflare_Protected_Site
## More Info: https://pypi.org/project/undetected-chromedriver/
## pip install undetected-chromedriver selenium
## https://stackoverflow.com/questions/68289474/selenium-headless-how-to-bypass-cloudflare-detection-using-selenium
import undetected_chromedriver as uc
from selenium import webdriver
options = webdriver.ChromeOptions()
options.headless = True
driver = uc.Chrome(options=options)
driver.get('https://abc.com')
driver.page_source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment