playwright-stealth
Make your playwright instance stealthy
What it is and what it does
playwright_stealth is a Playwright plugin that injects evasion scripts into browser contexts to mask the presence of automation. It works by modifying navigator properties (like `navigator.webdriver`) and other telemetry that websites use to detect headless or automated browsers. The package is a maintained fork of an earlier Puppeteer plugin, adapted for Playwright's async API.
The library offers both a simple recommended usage pattern (wrapping the async_playwright context manager) and fine-grained control via configuration options like custom language overrides and selective evasion toggles. It is explicitly positioned as a proof-of-concept for basic bot detection, not a comprehensive anti-detection solution—websites with sophisticated detection may still identify the browser as automated.
Use it for:
- Web scraping against sites with basic bot-detection that check navigator.webdriver or similar properties.
- Automated testing scenarios where you need to reduce false positives from client-side bot-detection logic.
- Proof-of-concept or research into browser fingerprinting and evasion techniques.
- Customizing navigator properties (languages, platform) across multiple pages in a single context.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Applies evasion techniques to Playwright browser instances to mask automation detection and bypass basic bot-detection methods.
Yes, if you need to bypass basic bot detection in Playwright automation. The package is actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is minimal. However, do not expect it to defeat sophisticated detection systems—use it as a starting point and be prepared to add custom evasions for harder targets.
Install
playwright-stealth on PyPI
pip
pip install playwright-stealthuv
uv add playwright-stealthpoetry
poetry add playwright-stealthInstalling playwright-stealth
Before you install
Low friction: pure Python wheel with a single runtime dependency on playwright. Actively maintained as of 2026-04-04 with recent commits and a modest but engaged user base.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install playwright-stealth
import asyncio
from playwright.async_api import async_playwright
from playwright_stealth import Stealth
async def main():
async with Stealth().use_async(async_playwright()) as p:
browser = await p.chromium.launch()
page = await browser.new_page()
result = await page.evaluate("navigator.webdriver")
print(result)
Requires Python 3.9 or later and an active Playwright installation with browser binaries.
Verify before relying
- Effectiveness against modern bot-detection systems beyond the 'simplest' methods mentioned in the description.
- Whether all evasion techniques remain current with evolving detection strategies.
- Compatibility with Playwright's persistent context launch mode (noted as a known limitation in the description).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — playwright |
| Maintenance | actively maintained — 132 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,512,899/month — #2,596 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: playwright_stealth-2.0.3-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
tf-playwright-stealthPatches Playwright to evade bot-detection…
permissive · top 15,000 on PyPI
cloakbrowserLaunches a stealth Chromium browser that evades…
permissive · top 15,000 on PyPI
selenium-stealthModifies a Selenium Chrome WebDriver to evade…
permissive · top 15,000 on PyPI
rebrowser-playwrightA patched version of Playwright that automates…
permissive · top 15,000 on PyPI
patchrightPatchright is an undetected fork of Playwright…
permissive · top 5,000 on PyPI
playwrightAutomate Chromium, Firefox, and WebKit browsers…
permissive · top 1,000 on PyPI
install-playwrightProvides a Python function to execute the…
permissive · top 15,000 on PyPI
hyperbrowserPython SDK for controlling remote browser…
permissive · top 15,000 on PyPI
recognizerSolves reCAPTCHA challenges using AI-based…
permissive · top 15,000 on PyPI
scrapy-playwrightIntegrates Playwright browser automation into…
permissive · top 5,000 on PyPI