A Firefox Selenium WebDriver that patches the browser to avoid detection. Bypasses services such as Cloudflare, Distil Networks, and more. Ideal for web scraping, automated testing, and bot development without getting detected.
Project description
Undetected GeckoDriver
Undetected-geckodriver is a patching tool that removes the webdriver property directly from the Geckodriver binary
This project is forked from Bytexenon's project by the same name after she archived her version, and is primarily maintained so the archival efforts of the Stack Exchange data dump can continue without Cloudflare outright blocking the archival.
Undetected geckodriver is not designed to bypass all of Cloudflare on its own; you still need to implement manual captcha stuff on your end if you get hit by a CF captcha wall. This tool exists so those captcha walls, if/when they're hit, aren't forced infinite bot check wall that redirects back to itself. Some sites, like Stack Exchange, have Cloudflare configured so aggressively that running into it is a guarantee; whether that wall can be bypassed with or without human supervision, however, seems to be down to the navigator.webdriver attribute.
There are a lot more things that can contribute to hard Cloudflare blocks, but this webdriver at least ensures the webdriver isn't the problem.
Installation
You can install the package via pip:
pip install undetected-geckodriver-lw
Or you can install it from source:
git clone https://github.com/LunarWatcher/undetected_geckodriver
cd undetected_geckodriver
pip install .
Supported operating systems
Only Windows and Linux are supported. macOS is not supported at this time, due to Crapple being crap to work with, it refusing all attempts to debug via Actions, and the only remaining option being to buy hardware for nearly or over 2000 EUR for enough access to debug a relatively basic file-related issue that still requires more hands-on access.
Pull requests making it work are welcome, and the only way it will be supported.
Usage
Since Undetected GeckoDriver acts as an interface for Selenium, you can use it the same way you would use Selenium.
You can integrate Undetected GeckoDriver into your existing Selenium code by simply replacing the selenium.webdriver.Firefox imports with undetected_geckodriver.Firefox.
Initialising the driver is done with:
from undetected_geckodriver import Firefox
driver = Firefox()
Everything else is fully compatible with Selenium. For general selenium usage instructions, see Selenium's own documentation
Requirements
- Firefox
- Python >= 3.6
pip3 install -r requirements.txt
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file undetected_geckodriver_lw-2.0.0.tar.gz.
File metadata
- Download URL: undetected_geckodriver_lw-2.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
047ada73fcf6afe2f996b892c20dd71a7620508b850b47706bb02881ab97f9f6
|
|
| MD5 |
a187d66cd1c35ca01fe9b86815cea62a
|
|
| BLAKE2b-256 |
663d9e722a3e65e0670d7c16e2b870779cdec0278c8f3647b9ed9849406b2f49
|
File details
Details for the file undetected_geckodriver_lw-2.0.0-py3-none-any.whl.
File metadata
- Download URL: undetected_geckodriver_lw-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59c26ddab3e04d840926d918271f2fe7881b255787b3424a33d0ec770da54ed8
|
|
| MD5 |
e4dc43081763323f17edee224f2c3927
|
|
| BLAKE2b-256 |
0ed6530574f9b4776be429713aee2de9be6408ea6e360e486c503f0574bef871
|