ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
10.14k stars 1.17k forks source link

undetected-chromedriver to bypass CF (cloudflare) currently not working #1432

Open JCDemon opened 1 year ago

JCDemon commented 1 year ago

Guys, I'm currently working on a project to scrape journal papers from "International Journal of Human–Computer Interaction". My code worked fine a week earlier, but it doesnt work now. It always stay in the verifying page. I searched online and found some news saying that cf did update and fix the "--auto-open-devtools-for-tabs". Is there any other solution to bypass cf? Here are the two methods that I used to bypass cf earlier, both not working for now. 1. options.add_argument('--ignore-certificate-errors') options.add_argument("--auto-open-devtools-for-tabs") driver= Chrome(options=options,executable_path='C:\Program Files\Google\Chrome\Application\chrome.exe') driver.get('https://www.tandfonline.com')

2. driver.execute_script('''window.open("https://www.tandfonline.com/loi/hihc20","_blank");''') # open page in new tab time.sleep(5) # wait until page has loaded driver.switch_to.window(window_name=driver.window_handles[0]) # switch to first tab driver.close() # close first tab driver.switch_to.window(window_name=driver.window_handles[0] ) # switch back to new tab time.sleep(2) driver.get("https://google.com") time.sleep(2) driver.get("https://www.tandfonline.com/loi/hihc20") # this should pass cloudflare captchas now

ksandkov commented 1 year ago

Check this out: https://github.com/ultrafunkamsterdam/undetected-chromedriver/discussions/1420

NCLnclNCL commented 1 year ago

Use js to open tab and url, after wait it load is complete and switch window handle

JCDemon commented 1 year ago

Check this out: #1420 thx, I'll have a look

JCDemon commented 1 year ago

Use js to open tab and url, after wait it load is complete and switch window handle

thx, is there any recommended tutorial?

thebetauser commented 1 year ago

The new tab and dev tools method was patched last week so they currently do not work.

digitalnomad91 commented 1 year ago

Working solutions / workarounds for now: https://github.com/FlareSolverr/FlareSolverr/issues/811#issuecomment-1660158095

Zebartin commented 1 year ago

Working solutions / workarounds for now: FlareSolverr/FlareSolverr#811 (comment)

Thanks, partially works for me. What's the trick?

In my case I have to manually click the cloudflare checkbox. Once I use driver.switch_to.window to try handling that, uc will get detected and click the checkbox over and over again without bypassing.

yanxiang-wang commented 1 year ago

Are there any new solutions? Thanks.

axiangcoding commented 1 year ago

same issue here. any one can share new solutions?