--- id: patchright version: "1.61.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # patchright — Undetected Python version of the Playwright testing and automation library. License: permissive · Maintenance: active · Downloads: 4.2M/mo ## 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 above — 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 pip install patchright uv add patchright 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_current - Install friction: medium - Maintenance: active - Downloads: 4.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags undetected browser automation, playwright alternative anti-detection, chromium automation stealth, bot detection evasion, headless browser testing undetected, web scraping anti-bot, playwright drop-in replacement, anti-detection, web-scraping, browser-automation [View on SkillFed](https://skillfed.io/packages/patchright) · [View on PyPI](https://pypi.org/project/patchright/)