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.71k stars 1.14k forks source link

Cloudfare Detection #944

Open JxdenGreen opened 1 year ago

JxdenGreen commented 1 year ago

Hi, would anyone be able to help me with this issue - cloudfare is detecting me. Thanks

nuclear-bean commented 1 year ago

Hi @JxdenGreen, recently it was proven that undetected chromedriver used correctly is still undetectable by cloudflare. Pay attention to your user agent, IP and scraper's behavior patterns.

alimp5 commented 1 year ago

Greetings ! @ultrafunkamsterdam @nuclear-bean Plz help us...


def check_ea ():
    profile_path = "/root/tst_selenium/my_profiles"
    cookie_path  = "/root/tst_selenium/my_profiles/test_cookie.pkl"
    chrome_driver_path = "/usr/bin/chromedriver"
    my_url = "https://www.ea.com/fifa/ultimate-team/web-app/"
    user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.0.0 Safari/537.36'    

    options = uc.ChromeOptions()
    options.user_data_dir = profile_path
    options.add_argument(f'--user-data-dir={profile_path}')
    options.add_argument('--no-first-run --no-service-autorun --password-store=basic')
    options.add_argument("--excludeSwitches --enable-logging")
    options.add_argument("--headless")
    options.add_argument('--no-sandbox')
    options.add_argument('--disable-features=IsolateOrigins,site-per-process')
    options.add_argument("--ignore_ssl")
    options.add_argument('--ignore-ssl-errors')
    options.add_argument('--ignore-certificate-errors')
    options.add_argument('--allow-insecure-localhost')
    options.add_argument('--window-size=1024x768')
    options.add_argument("start-maximized")
    options.add_argument('--disable-blink-features=AutomationControlled')

    driver = uc.Chrome (version_main=98, options=options, executable_path=chrome_driver_path)

    driver.get(my_url)
    driver.delete_all_cookies()
    driver.get(my_url)
    print(driver.page_source)

if __name__ == '__main__':
    check_ea() 

output:

Access Denied

Access Denied

You don't have permission to access "http://www.ea.com/fifa/ultimate-team/web-app/" on this server.

Reference #18.adb51002.1670817796.2aba8dc1

How to fix it?

alimp5 commented 1 year ago

strange behavior: when i run code above on windows, script works fine without problem. but root issue is in Linux. i tested on Debian 11 & Debian 10 & Ubuntu LTS.

where is the problem !!??

shatha-albajly commented 1 year ago

Have you find a solution?