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
9.07k stars 1.09k forks source link

Cloud Flare Detection - undetected-chromedriver and seleniumbase #1541

Open IdanAlbilia opened 10 months ago

IdanAlbilia commented 10 months ago

So i was trying to use undetected-chromedriver and seleniumbase in order to go on this website https://apk.support/apk-downloader

whenever i run the code on my local machine it works fine and therse no cloud flare but whenever i run it on my aws ec2 instance i get the cloud flare captcha.

the code - seleniumbase:

from seleniumbase import Driver self.browser = Driver(uc=True) self.browser.get("https://apk.support/apk-downloader")

the code - undetected-chromedriver: (Some workaround i saw here a few weeks back which solves the cloud flare problem) self.browser = uc.Chrome(options=options, use_subprocess=True) self.browser.execute_script('''window.open("http://nowsecure.nl","_blank");''') # open page in new tab time.sleep(5) # wait until page has loaded self.browser.switch_to.window(window_name=self.browser.window_handles[0]) # switch to first tab self.browser.close() # close first tab self.browser.switch_to.window(window_name=self.browser.window_handles[0]) # switch back to new tab time.sleep(2) self.browser.get("https://google.com") time.sleep(2) self.browser.get("https://apk.support/apk-downloader")

what could be the problem? i use xvfb in order to simulate a screen in the aws ec2 instance. in order to verify the fact that i get cloud flare i use screenshots and indeed i see the page of cloud flare.

if someone have any guidance it will be great!! Thanks in advance.

jdholtz commented 10 months ago

I’m a bit confused what the seleniumbase code has to do with the issue. Is it bypassing Cloudflare on SB but not UC? SB’s undetected mode is basically a fork of this repository, but it isn’t associated with this repository