Skip to main content

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.

Metadata

Release files for undetected-geckodriver-lw 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for undetected-geckodriver-lw 2.1.0
File Size Uploaded
undetected_geckodriver_lw-2.1.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for undetected-geckodriver-lw 2.1.0
File Interpreter ABI Platform
undetected_geckodriver_lw-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / undetected_geckodriver_lw-2.1.0.tar.gz

Download URL undetected_geckodriver_lw-2.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
de7ff9c54f0f2766c6bc6bdcafb3bae8fd5f7cc96fdcd15e349db8815a8fa869
BLAKE2b-256 checksum
How to use checksums
d050dba5a841dd38c55999412f390daafcc39974ff919102b95a1c4197161740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / undetected_geckodriver_lw-2.1.0-py3-none-any.whl

Download URL undetected_geckodriver_lw-2.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc980e92abe941eb2e94b3321ea5660230e5edaf345340019affb225d5cb5620
BLAKE2b-256 checksum
How to use checksums
a90d88a73c63a721d914971732852fc704e19831a5b4d20a564982ce994b4ccf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page