Patchright is a patched and undetected version of the Playwright Testing and Automation Framework. It can be used as a drop-in replacement for Playwright.
[!NOTE]
This repository serves the Patchright-Python Package. To use Patchright with NodeJS, check out the NodeJS Package.
Also check out the main Patchright Driver Repository
Sponsors
Want to Sponsor this Project? Contact @vinyzu on Discord!
NodeMaven: Your efficient proxy provider for Web Scraping and Automation with High Quality IPs.
🎯 ZIP targeting
✅ 99.9% Uptime
🔍 IP Filtering: Proxies are guaranteed to have fraud score <97%
🔰 No KYC required
🎉 Unique free tools: Proxy Bandwidth Checker, Meta Tag Checker, IP Lookup and others!
Special codes for Patchright users:
🔥 PATCHRIGHT35 - 35% off to Mobile and Residential Proxies
🔥 PATCHRIGHT40 - 40% off to ISP (Static) Proxies
Choose quality and stability with NodeMaven. Check Nodemaven's new GitHub for more web scraping and automation solutions - https://github.com/nodemaven
Swiftproxy: High-Performance Residential Proxies for Scalable Data Collection
Built for developers who need reliable, anti-detection proxy infrastructure. Swiftproxy delivers stable connections, high success rates, and flexible control for large-scale scraping and automation.
🌍 195+ locations with ethically sourced residential IPs
🔄 Rotating & sticky sessions with precise geo-targeting
⚡ Optimized for anti-ban & high success rate
🔌 HTTP / HTTPS / SOCKS5 support
🧪 Free 500MB trial for testing
💸 Special discount code for Patchright users: PROXY90 - 10%
Best for: Web scraping, automation, multi-accounting, and large-scale data extraction
RapidProxy provides a stable and high-performance proxy network built for large-scale data operations.
Getting the browser past detection is one problem. Keeping proxies rotating, fingerprints
current and sessions alive across a few million requests is a different one. Scrappey
takes the second problem: one endpoint, solved pages back.
Clearcote — our own patched Chromium, maintained in-house, not a stock build
Several engines behind one endpoint — blocked on one stack, routed to another
Click, type, wait and scroll over the API — a real session, not a fetch proxy
Residential and datacenter proxies included, or bring your own
Best Practice - use Chrome without Fingerprint Injection
To be completely undetected, use the following configuration:
playwright.chromium.launch_persistent_context(
user_data_dir="...",
channel="chrome",
headless=False,
no_viewport=True,
# do NOT add custom browser headers or user_agent
...
)
[!NOTE]
We recommend using Google Chrome instead of Chromium.
You can install it via patchright install chrome (or via any other installation method) and use it with channel="chrome".
This is the biggest Patch Patchright uses. To avoid detection by this leak, patchright avoids using Runtime.enable by executing Javascript in (isolated) ExecutionContexts.
Patchright patches this leak by disabling the Console API all together. This means, console functionality will not work in Patchright. If you really need the console, you might be better off using Javascript loggers, although they also can be easily detected.
Command Flags Leaks
Patchright tweaks the Playwright Default Args to avoid detection by Command Flag Leaks. This (most importantly) affects:
--disable-blink-features=AutomationControlled (added) to avoid navigator.webdriver detection.
--enable-automation (removed) to avoid navigator.webdriver detection.
--disable-popup-blocking (removed) to avoid popup crashing.
--disable-component-update (removed) to avoid detection as a Stealth Driver.
--disable-default-apps (removed) to enable default apps.
--disable-extensions (removed) to enable extensions
General Leaks
Patchright patches some general leaks in the Playwright codebase. This mainly includes poor setups and obvious detection points.
Closed Shadow Roots
Patchright is able to interact with elements in Closed Shadow Roots. Just use normal locators and Patchright will do the rest.
Patchright is now also able to use XPaths in Closed Shadow Roots.
Stealth
With the right setup, Patchright currently is considered undetectable.
Patchright passes:
Deployment of new Patchright versions are automatic, but bugs due to Playwright codebase changes may occur. Fixes for these bugs might take a few days to be released.
Support our work
If you choose to support our work, please contact @vinyzu or @steve_abcdef on Discord.
This repository is provided for educational purposes only.
No warranties are provided regarding accuracy, completeness, or suitability for any purpose. Use at your own risk—the authors and maintainers assume no liability for any damages, legal issues, or warranty breaches resulting from use, modification, or distribution of this code. Any misuse or legal violations are the sole responsibility of the user.
('Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.', 'Not triggered by CloudFlare/Imperva/hCaptcha and such.', 'NOTE: results may vary due to many factors. No guarantees are given, except for ongoing efforts in understanding detection algorithms.')