tf-playwright-stealth
Makes playwright stealthy like a ninja!
What it is and what it does
tf-playwright-stealth wraps Playwright's page object to inject browser-spoofing logic that masks the telltale signs of automated browser control. It patches navigator properties, disables headless indicators, and injects realistic HTTP headers via its fake-http-header dependency to make Playwright-driven browsers appear more like genuine user agents. The package is a port of puppeteer-extra-plugin-stealth and provides both synchronous and asynchronous APIs that integrate directly into Playwright's existing workflow.
You install it alongside Playwright, then call stealth_sync() or stealth_async() on a page object before navigating to your target. It does not change how you write Playwright code—it simply adds evasion layers to reduce detection risk. The package is actively maintained, supports Python 3.9 through 3.13, and carries no known security vulnerabilities.
Use it for:
- Web scraping sites that block or challenge automated access by detecting headless browser signatures.
- Automated testing of anti-bot systems to verify their detection logic works as intended.
- Legitimate browser automation tasks on sites that require human-like browser behavior to function correctly.
- Gathering data from pages that serve different content to bots versus human browsers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Patches Playwright to evade bot-detection systems by spoofing browser features and headers, reducing the likelihood of automated scripts being identified as non-human.
Yes, if you need to run Playwright against sites with bot detection. The package has low install friction, active maintenance, a permissive MIT license, no known vulnerabilities, and a clear single purpose. Be aware that stealth measures are inherently an arms race—detection techniques evolve, and this package's effectiveness depends on staying ahead of that curve.
Install
tf-playwright-stealth on PyPI
pip
pip install tf-playwright-stealthuv
uv add tf-playwright-stealthpoetry
poetry add tf-playwright-stealthInstalling tf-playwright-stealth
Before you install
Low friction installation with only two runtime dependencies (playwright and fake-http-header). The package is actively maintained with a recent commit on 2026-08-09 and has been in active development since its first release on 2024-03-07.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only that you retain the license notice in distributions.
Quickstart
pip install tf-playwright-stealth
from playwright.sync_api import sync_playwright
from tf_playwright_stealth import stealth_sync
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
stealth_sync(page)
page.goto("https://example.com")
browser.close()
Requires Playwright to be installed and a Chromium browser available; intended for Python 3.9 or later.
Verify before relying
- Effectiveness against specific bot-detection systems or services beyond the bot.sannysoft.com test shown in the description.
- Whether stealth measures remain effective as detection techniques evolve or as Playwright itself is updated.
- Performance overhead introduced by stealth spoofing compared to unpatched Playwright usage.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — playwright, fake-http-header |
| Maintenance | actively maintained — 427 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 639,192/month — #5,616 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tf_playwright_stealth-1.2.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
cloakbrowserLaunches a stealth Chromium browser that evades…
permissive · top 15,000 on PyPI
playwright-stealthApplies evasion techniques to Playwright…
permissive · top 5,000 on PyPI
recognizerSolves reCAPTCHA challenges using AI-based…
permissive · top 15,000 on PyPI
patchrightPatchright is an undetected fork of Playwright…
permissive · top 5,000 on PyPI
selenium-stealthModifies a Selenium Chrome WebDriver to evade…
permissive · top 15,000 on PyPI
camoufoxPython wrapper around Playwright that…
permissive · top 5,000 on PyPI
rebrowser-playwrightA patched version of Playwright that automates…
permissive · top 15,000 on PyPI
stagehandStagehand is a Python SDK for building browser…
permissive · top 5,000 on PyPI
playwrightAutomate Chromium, Firefox, and WebKit browsers…
permissive · top 1,000 on PyPI
axe-playwright-pythonRuns automated accessibility audits on web…
unclear · top 15,000 on PyPI