All Projects → ultrafunkamsterdam → Undetected Chromedriver

ultrafunkamsterdam / Undetected Chromedriver

Licence: gpl-3.0
Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Undetected Chromedriver

Sillynium
Automate the creation of Python Selenium Scripts by drawing coloured boxes on webpage elements
Stars: ✭ 100 (-72.6%)
Mutual labels:  automation, selenium, chromedriver, chrome
Cdp4j
cdp4j - Chrome DevTools Protocol for Java
Stars: ✭ 232 (-36.44%)
Mutual labels:  automation, selenium, webdriver, chrome
Python Scripts
Collection of Various Python Script's.💻
Stars: ✭ 195 (-46.58%)
Mutual labels:  automation, selenium, webdriver, browser
Instagram Profilecrawl
💻 Quickly crawl the information (e.g. followers, tags, etc...) of an instagram profile. No login required!
Stars: ✭ 110 (-69.86%)
Mutual labels:  automation, selenium, chromedriver, browser
Panther
A browser testing and web crawling library for PHP and Symfony
Stars: ✭ 2,480 (+579.45%)
Mutual labels:  scraping, selenium, webdriver, chromedriver
Edge Selenium Tools
An updated EdgeDriver implementation for Selenium 3 with newly-added support for Microsoft Edge (Chromium).
Stars: ✭ 41 (-88.77%)
Mutual labels:  automation, selenium, webdriver
Infospider
INFO-SPIDER 是一个集众多数据源于一身的爬虫工具箱🧰,旨在安全快捷的帮助用户拿回自己的数据,工具代码开源,流程透明。支持数据源包括GitHub、QQ邮箱、网易邮箱、阿里邮箱、新浪邮箱、Hotmail邮箱、Outlook邮箱、京东、淘宝、支付宝、中国移动、中国联通、中国电信、知乎、哔哩哔哩、网易云音乐、QQ好友、QQ群、生成朋友圈相册、浏览器浏览历史、12306、博客园、CSDN博客、开源中国博客、简书。
Stars: ✭ 5,984 (+1539.45%)
Mutual labels:  automation, selenium, chrome
Singlefile
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file
Stars: ✭ 4,417 (+1110.14%)
Mutual labels:  selenium, chrome, browser
Thirtyfour
Selenium WebDriver client for Rust, for automated testing of websites
Stars: ✭ 191 (-47.67%)
Mutual labels:  automation, selenium, webdriver
Webdriver
Remote control interface that enables introspection and control of user agents.
Stars: ✭ 546 (+49.59%)
Mutual labels:  automation, webdriver, browser
Foot traffic
Pure Ruby DSL for Chrome scripting based on Ferrum. No Selenium required. Works from any script. Simulate web app usage scenarios in production or locally.
Stars: ✭ 123 (-66.3%)
Mutual labels:  automation, chrome, browser
Element
💦Load test your app using real web browsers
Stars: ✭ 204 (-44.11%)
Mutual labels:  automation, webdriver, chrome
Navalia
A bullet-proof, fast, and reliable headless browser API
Stars: ✭ 950 (+160.27%)
Mutual labels:  automation, chrome, browser
Wdio Workshop
WebdriverIO Workshop
Stars: ✭ 20 (-94.52%)
Mutual labels:  automation, selenium, webdriver
Pychromeless
Python Lambda Chrome Automation (naming pending)
Stars: ✭ 219 (-40%)
Mutual labels:  automation, selenium, chrome
Nightwatch Cucumber
[DEPRECATED] Cucumber.js plugin for Nightwatch.js.
Stars: ✭ 243 (-33.42%)
Mutual labels:  automation, selenium, browser
docker-selenium-lambda
The simplest demo of chrome automation by python and selenium in AWS Lambda
Stars: ✭ 172 (-52.88%)
Mutual labels:  scraping, selenium, chromedriver
Whole Foods Delivery Slot
Automated script for Whole Foods and Amazon Fresh delivery slot
Stars: ✭ 460 (+26.03%)
Mutual labels:  automation, webdriver, chrome
Nickjs
Web scraping library made by the Phantombuster team. Modern, simple & works on all websites. (Deprecated)
Stars: ✭ 494 (+35.34%)
Mutual labels:  automation, scraping, browser
Splinter
splinter - python test framework for web applications
Stars: ✭ 2,476 (+578.36%)
Mutual labels:  automation, selenium, webdriver

undetected_chromedriver

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

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

  • Tested from version 80 until current beta
  • Patching also works on MS Edge (chromium-based) webdriver binary
  • Python 3.6++

Installation

pip install undetected-chromedriver

Usage

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


the easy way (recommended)

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

the V2 (beta) way

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

target specific chrome version

import undetected_chromedriver as uc
uc.TARGET_VERSION = 85
driver = uc.Chrome()

monkeypatch mode

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
uc.TARGET_VERSION = 78    

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

uc.install(
    executable_path='c:/users/user1/chromedriver.exe',
)

opts = uc.ChromeOptions()
opts.add_argument(f'--proxy-server=socks5://127.0.0.1:9050')
driver = uc.Chrome(options=opts)
driver.get('https://distilnetworks.com')

datadome.co example

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()
chrome.get('https://datadome.co/customers-stories/toppreise-ends-web-scraping-and-content-theft-with-datadome/')
chrome.save_screenshot('datadome_regular_webdriver.png')
True   # it caused my ip to be flagged, unfortunately


#
# UNDETECTED chromedriver (headless,even)
#
import undetected_chromedriver as uc
options = uc.ChromeOptions()
options.headless=True
options.add_argument('--headless')
chrome = uc.Chrome(options=options)
chrome.get('https://datadome.co/customers-stories/toppreise-ends-web-scraping-and-content-theft-with-datadome/')
chrome.save_screenshot('datadome_undetected_webddriver.png')

Check both saved screenhots here

important note

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('https://distilnetworks.com') # starts magic
In [4]: driver.execute_script('return navigator.webdriver')
In [5]: None  # Undetectable!

end important note

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].