skillfed

playwright-stealth

Make your playwright instance stealthy

playwright-stealth v2.0.3 3.5M downloads/30d#2,596 on PyPI263
Permissive license MIT Active released

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-stealth

uv

uv add playwright-stealth

poetry

poetry add playwright-stealth

Installing 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

Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

playwright bot detection bypassbrowser automation stealthplaywright webdriver evasionhide automation detectionplaywright navigator mocking
web-automationbot-detection-evasion

More Testing packages

Further reading