skillfed

patchright

Undetected Python version of the Playwright testing and automation library.

patchright v1.61.2 4.2M downloads/30d#2,367 on PyPI1,463
Permissive license Apache-2.0 Active released

What it is and what it does

Patchright is a modified version of Playwright that patches known detection vectors used by anti-bot systems. It disables or modifies default command-line flags, avoids Runtime.enable and Console.enable leaks, and can interact with closed Shadow DOM elements—all designed to make automated browser sessions appear more like legitimate user activity. The package maintains Playwright's sync and async APIs, so existing code can often run unchanged by simply swapping the import statement.

The package is actively maintained with recent releases and passes several major anti-bot systems. It requires Python 3.10 or later and depends on pyee and greenlet. Browser drivers must be installed separately, and the documentation emphasizes using Google Chrome with specific launch configurations for best stealth results.

Use it for:

  • Web scraping sites protected by major bot-detection systems
  • Automated testing of web applications that check for headless browser signatures
  • Account automation workflows where detection avoidance is critical
  • Extracting data from sites that actively block automated access
  • Interaction with closed Shadow DOM elements without modifying page structure

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Patchright is an undetected fork of Playwright that automates Chromium-based browsers while evading bot-detection systems. It works as a drop-in replacement for Playwright's sync and async APIs.

Yes, if you need to automate Chromium against bot-detection systems and accept the trade-offs. Patchright is actively maintained with no known vulnerabilities. However, install it only if standard Playwright fails due to detection—anti-detection techniques are inherently fragile and may break as detection systems evolve. Verify that your use case complies with the target site's terms of service.

Install

patchright on PyPI

pip

pip install patchright

uv

uv add patchright

poetry

poetry add patchright

Installing patchright

Before you install

Medium friction: precompiled wheels for multiple platforms (macOS, Linux, Windows, ARM) reduce build complexity, but requires a separate driver installation step and depends on pyee and greenlet for event handling and async support.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install patchright
patchright install chromium

from patchright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto('http://example.com')
    browser.close()

Requires Python 3.10+. Chromium driver must be installed separately via `patchright install chromium`. Only supports Chromium-based browsers; Firefox and WebKit are not supported.

Verify before relying

  • Whether anti-detection patches remain effective as bot-detection systems evolve
  • Performance overhead compared to standard Playwright due to stealth modifications
  • Compatibility guarantees if Playwright's API changes significantly in future releases

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 2 — pyee, greenlet
Maintenance actively maintained — 40 days since the last release
Last repo commit
First released
Downloads 4,178,710/month — #2,367 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: patchright-1.61.2-py3-none-macosx_10_13_x86_64.whl; patchright-1.61.2-py3-none-macosx_11_0_arm64.whl; patchright-1.61.2-py3-none-macosx_11_0_universal2.whl; patchright-1.61.2-py3-none-manylinux1_x86_64.whl; patchright-1.61.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; patchright-1.61.2-py3-none-win32.whl; patchright-1.61.2-py3-none-win_amd64.whl; patchright-1.61.2-py3-none-win_arm64.whl

Intended Audience :: DevelopersOperating 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.14Topic :: Internet :: WWW/HTTP :: BrowsersTopic :: Software Development :: Testing

Tags

undetected browser automationplaywright alternative anti-detectionchromium automation stealthbot detection evasionheadless browser testing undetectedweb scraping anti-botplaywright drop-in replacement
anti-detectionweb-scrapingbrowser-automation

More Testing packages

pluggy

Pluggy provides a plugin system that lets you…

permissive · top 100 on PyPI

pytest

pytest is a testing framework that lets you…

permissive · top 100 on PyPI

virtualenv

virtualenv creates isolated Python environments…

permissive · top 100 on PyPI

coverage

Coverage.py measures which lines of Python code…

permissive · top 1,000 on PyPI

pytest-asyncio

pytest-asyncio is a pytest plugin that enables…

permissive · top 1,000 on PyPI

pytest-json-ctrf

A pytest plugin that generates test reports in…

permissive · top 1,000 on PyPI

rebrowser-playwright

A patched version of Playwright that automates…

permissive · top 15,000 on PyPI

playwright

Automate Chromium, Firefox, and WebKit browsers…

permissive · top 1,000 on PyPI

tf-playwright-stealth

Patches Playwright to evade bot-detection…

permissive · top 15,000 on PyPI

cloakbrowser

Launches a stealth Chromium browser that evades…

permissive · top 15,000 on PyPI

pytest-playwright

A pytest plugin that integrates Playwright…

permissive · top 5,000 on PyPI

playwright-stealth

Applies evasion techniques to Playwright…

permissive · top 5,000 on PyPI

pytest-playwright-asyncio

A pytest plugin that integrates Playwright…

permissive · top 15,000 on PyPI

recognizer

Solves reCAPTCHA challenges using AI-based…

permissive · top 15,000 on PyPI

axe-playwright-python

Runs automated accessibility audits on web…

unclear · top 15,000 on PyPI

robotframework-browser

Browser automation library for Robot Framework…

permissive · top 5,000 on PyPI