Last active
November 19, 2022 14:19
-
-
Save kaushikgandhi/b3221f4735214680bcd31b4b6cbf2e8c to your computer and use it in GitHub Desktop.
Bypass Cloudflare Protected site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##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