Skip to main content

selenium.webdriver.Chrome replacement wiht compatiblity for Brave, and other Chromium baed browsers. not triggered by CloudFlare/Imperva/hCaptcha and such. NOTE: results may vary due to many factors. No guarantees are given, except for ongoing efforts in understanding detection algorithms.

Project description


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

  • Tested until current chrome beta versions
  • Works also on Brave Browser and many other Chromium based browsers
  • Python 3.6++


pip install undetected-chromedriver


To prevent unnecessary hair-pulling and issue-raising, please mind the important note at the end of this document .

The Version 2 way

Literally, this is all you have to do. Settings are included and your browser executable found automagically.

import undetected_chromedriver.v2 as uc
driver = uc.Chrome()
with driver:
    driver.get('')  # known url using cloudflare's "under attack mode"

the easy way (v1 old stuff)

import undetected_chromedriver as uc
driver = uc.Chrome()

target specific chrome version (v1 old stuff)

import undetected_chromedriver as uc
driver = uc.Chrome()

monkeypatch mode (v1 old stuff)

Needs to be done before importing from selenium package

import undetected_chromedriver as uc

from selenium.webdriver import Chrome
driver = Chrome()

the customized way (v1 old stuff)

import undetected_chromedriver as uc

#specify chromedriver version to download and patch
uc.TARGET_VERSION = 78    

# or specify your own chromedriver binary (why you would need this, i don't know)


opts = uc.ChromeOptions()
driver = uc.Chrome(options=opts)
driver.get('') example (v1 old stuff)

These guys have actually a powerful product, and a link to this repo, which makes me wanna test their product. Make sure you use a "clean" ip for this one.

# STANDARD selenium Chromedriver
from selenium import webdriver
chrome = webdriver.Chrome()
True   # it caused my ip to be flagged, unfortunately

# UNDETECTED chromedriver (headless,even)
import undetected_chromedriver as uc
options = uc.ChromeOptions()
chrome = uc.Chrome(options=options)

Check both saved screenhots here

important note (v1 old stuff)

Due to the inner workings of the module, it is needed to browse programmatically (ie: using .get(url) ). Never use the gui to navigate. Using your keybord and mouse for navigation causes possible detection! New Tabs: same story. If you really need multi-tabs, then open the tab with the blank page (hint: url is data:, including comma, and yes, driver accepts it) and do your thing as usual. If you follow these "rules" (actually its default behaviour), then you will have a great time for now.

TL;DR and for the visual-minded:

In [1]: import undetected_chromedriver as uc
In [2]: driver = uc.Chrome()
In [3]: driver.execute_script('return navigator.webdriver')
Out[3]: True  # Detectable
In [4]: driver.get('') # starts magic
In [4]: driver.execute_script('return navigator.webdriver')
In [5]: None  # Undetectable!

end important note

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

undetected-chromedriver-2.2.7.tar.gz (26.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page