Skip to main content

Stealthenium Python Versions

Stealthenium 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, Stealthenium only supports Chrome and Remote WebDriver.

This project is a fork of the now-unmaintained selenium-stealth by diprajpatra, last updated on November 5 2020 as of August 23 2024. It serves as a Python equivalent of the JavaScript puppeteer-extra-plugin-stealth developed by berstend.

Features

  • Passes public bot detection tests.
  • Bypasses Cloudflare and other bot detection systems.
  • Maintains a reasonable reCAPTCHA v3 score.

Installation

Stealthenium is available on PyPI. Install it via pip:

$ pip install stealthenium

Usage

from selenium import webdriver
from stealthenium import stealth
import time

options = webdriver.ChromeOptions()
options.add_argument("start-maximized")

# options.add_argument("--headless")

options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)

driver = webdriver.Chrome(
    options=options,
    service=webdriver.ChromeService(r"\chromedriver.exe")
)

stealth(driver,
        languages=["en-US", "en"],
        vendor="Google Inc.",
        platform="Win32",
        webgl_vendor="Intel Inc.",
        renderer="Intel Iris OpenGL Engine",
        fix_hairline=True,
        )

url = "https://bot.sannysoft.com/"
driver.get(url)
time.sleep(5)
driver.quit()

Args

stealth(
    driver: Driver,
    user_agent: str = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36',
    languages: [str] = ["en-US", "en"],
    vendor: str = "Google Inc.",
    platform: str = "Win32",
    webgl_vendor: str = "Intel Inc.",
    renderer: str = "Intel Iris OpenGL Engine",
    fix_hairline: bool = False,
    run_on_insecure_origins: bool = False,
)

Test results (red = bad)

Without stealthenium

headless
headful

With stealthenium

headless
headful

License

This project is licensed under the MIT License. See the LICENSE file for details.

© 2024 markmelnic

Release files for stealthenium 1.1.1

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

Source distribution (sdist)

Source distribution for stealthenium 1.1.1
File Size Uploaded Provenance Actions
stealthenium-1.1.1.tar.gz 22.8 kB Without provenance Details for stealthenium-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stealthenium 1.1.1
File Interpreter ABI Platform Actions
stealthenium-1.1.1-py3-none-any.whl Python 3 none any Details for stealthenium-1.1.1-py3-none-any.whl

Total release size: 55.2 kB

Release files / stealthenium-1.1.1.tar.gz

Download URL stealthenium-1.1.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0db691632c9e899d17f7f1123f204de500df8b2c88a6cd25fb5bb1a09eadddb9
BLAKE2b-256 checksum
How to use checksums
e39573b45cb450de6038d38d606f529cd94fef06a4dfa9e55868742dca0c3029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / stealthenium-1.1.1-py3-none-any.whl

Download URL stealthenium-1.1.1-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0aa525d09a81c15e633882adaac2f70b124d21c2c3db2fd17cf443a2dcdeb70f
BLAKE2b-256 checksum
How to use checksums
a0da4aa0765135079242520f8f90abc1a51e48ade42d6ad5dd753cc20b518a74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for stealthenium 1.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

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