Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
Go to file
Leon fee707a054
Update __init__.py
2020-06-03 13:44:22 +02:00
undetected_chromedriver Update __init__.py 2020-06-03 13:44:22 +02:00
.gitignore Initial commit 2019-12-22 13:44:18 +01:00
LICENSE Initial commit 2019-12-22 13:44:18 +01:00
README.md Update README.md 2020-05-20 21:26:11 +02:00
setup.py fixed the TARGET_VERSION variable. is now actually evaluated at execution time so the correct chromedriver for your version of chrome is being downloaded... + some refactorings 2020-05-19 20:55:13 +02:00

README.md

undetected_chromedriver

https://github.com/ultrafunkamsterdam/undetected-chromedriver

Optimized Selenium Chromedriver patch which does not trigger anti-bot services like Distill Network. Automatically downloads the driver binary and patches it.

  • Tested on version 75,76,77,78,79,80,81,83

  • patching also works on MS Edge (chromium-based) webdriver binary

Installation

pip install  git+https://github.com/ultrafunkamsterdam/undetected-chromedriver.git

Usage

from undetected_chromedriver import Chrome, ChromeOptions
driver = Chrome()
driver.get('https://distilnetworks.com')

patches selenium module

Needs to be done before importing from selenium package

import undetected_chromedriver as uc
uc.install()
from selenium.webdriver import Chrome
driver = Chrome()
driver.get('https://distilnetworks.com')

the customized way

import undetected_chromedriver as uc

#specify chromedriver version to download and patch
#this did not work correctly until 1.2.1
uc.TARGET_VERSION = 78    

# or specify your own chromedriver binary to patch
undetected_chromedriver.install(
    executable_path='c:/users/user1/chromedriver.exe',
)
from selenium.webdriver import Chrome, ChromeOptions
opts = ChromeOptions()
opts.add_argument(f'--proxy-server=socks5://127.0.0.1:9050')
driver = Chrome(options=opts)
driver.get('https://distilnetworks.com')