Sneaky Selenium 
Sneaky Selenium is a Python package designed to prevent Selenium from being detected. Its primary goal is to enhance Selenium's stealth capabilities ensuring smooth automation while bypassing detection systems. Currently supports Chrome and Remote WebDriver.
Project Lineage
This project has evolved through several maintainers:
- puppeteer-extra-plugin-stealth by berstend (2019) - The original JavaScript stealth plugin for Puppeteer
- selenium-stealth by diprajpatra (2020) - Python port for Selenium, now unmaintained
- stealthenium by markmelnic (2024) - Updated fork with fixes
- sneaky-selenium (2026) - Current version with modern evasions, Tor integration, and Python 3.13+ support
Features
- Passes public bot detection tests.
- Bypasses Cloudflare and other bot detection systems.
- Maintains a reasonable reCAPTCHA v3 score.
- Tor integration for anonymous browsing.
- Updated for 2026 with modern evasion techniques.
Installation
Available on PyPI:
pip install sneaky-selenium
For Tor support (optional):
pip install sneaky-selenium[tor]
Usage
from selenium import webdriver
from sneaky_selenium import stealth
import time
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options)
stealth(driver,
languages=["en-US", "en"],
vendor="Google Inc.",
platform="Win32",
webgl_vendor="Intel Inc.",
renderer="Intel Iris OpenGL Engine",
fix_hairline=True,
)
driver.get("https://bot.sannysoft.com/")
time.sleep(5)
driver.quit()
Tor Integration
Sneaky Selenium supports routing traffic through the Tor network for anonymous browsing.
Prerequisites
- Install Tor:
sudo pacman -S tor(Arch) /sudo apt install tor(Debian) /brew install tor(macOS) - Start Tor:
sudo systemctl start tor - Install with Tor support:
pip install sneaky-selenium[tor]
Quick Start with Tor
from sneaky_selenium import stealth_with_tor
# One-liner to create a stealthed browser routing through Tor
driver = stealth_with_tor()
driver.get("https://check.torproject.org")
driver.quit()
Custom Tor Configuration
from sneaky_selenium import stealth_with_tor, TorDriverConfig
config = TorDriverConfig(
socks_host="127.0.0.1",
socks_port=9050, # Default Tor port (9150 for Tor Browser Bundle)
headless=True,
additional_options=["--window-size=1920,1080"],
)
driver = stealth_with_tor(
config=config,
languages=["en-US", "en"],
platform="Win32",
)
driver.get("https://bot.sannysoft.com/")
driver.quit()
Utility Functions
from sneaky_selenium import (
is_tor_available,
check_tor_connection,
get_tor_exit_ip,
verify_tor_connection_via_driver,
)
# Check if Tor is running
if is_tor_available():
print("Tor is available!")
# Get connection info (requires requests[socks])
info = check_tor_connection()
print(f"Connected: {info['connected']}, IP: {info['ip']}, Is Tor: {info['is_tor']}")
# Verify via browser
result = verify_tor_connection_via_driver(driver)
print(result["message"])
API Reference
stealth(
driver: Driver,
user_agent: str | None = None,
languages: list[str] | None = ["en-US", "en"],
vendor: str = "Google Inc.",
platform: str | None = "Win32",
webgl_vendor: str = "Intel Inc.",
renderer: str = "Intel Iris OpenGL Engine",
fix_hairline: bool = False,
run_on_insecure_origins: bool = False,
device_memory: int = 8,
hardware_concurrency: int = 8,
)
License
This project is licensed under the MIT License. See the LICENSE file for details.
© 2019 berstend, 2020 diprajpatra, 2024 markmelnic, 2026 KaiErikNiermann
Release files for sneaky-selenium 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sneaky_selenium-2.0.0.tar.gz | 25.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sneaky_selenium-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.3 kB
Release files / sneaky_selenium-2.0.0.tar.gz
| Download URL | sneaky_selenium-2.0.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7b95ed48334e22237cc2ba8db6ba1873d15ff3bb438afe3b4438c4b6f781992
|
|
BLAKE2b-256 checksum How to use checksums |
df00f728ff78cfdb58b3e657c0330732d48b7ceaba1e6c3a00b45ea61cd1e3f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency logRelease files / sneaky_selenium-2.0.0-py3-none-any.whl
| Download URL | sneaky_selenium-2.0.0-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
069b15276d78f83ad96c1eb3ddb2c43baf8dabfe47019cf62e5a457e19382b80
|
|
BLAKE2b-256 checksum How to use checksums |
b78d996c138278b652cb17feef26677ab015ae6c73fbd0019dc6b6beca0dced1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency log