Skip to main content

🎭 Patchright Python


Patchright Version PyPI Downloads

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.


Sponsors

Want to Sponsor this Project? Contact @vinyzu on Discord!

NodeMaven Banner

NodeMaven: Your efficient proxy provider for Web Scraping and Automation with High Quality IPs.


Why NodeMaven?

🎯 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.


swiftproxy banner

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 banner

RapidProxy provides a stable and high-performance proxy network built for large-scale data operations.

RapidProxy delivers:

  • 🌍 90M+ Residential IPs (200+ locations)
  • 🔄 Rotating Residential Proxies — from $0.65/GB (non-expiring traffic)
  • 🧩 Static Residential IPs — $5/IP (30 days, unlimited traffic)
  • 🎯 Precise geo-targeting
  • ⚡ Free Trial Available — test proxy performance risk-free
  • Built for scraping, automation, and high-performance data workflows.
  • 🔥 Special Offer: Use code RAPID10 to get 10% off

Start fast. Scale globally. Stay stable with RapidProxy.


Scrappey

Sponsored by Scrappey

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
  • Per request, no monthly minimum
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "request.get", "url": "https://example.com"}'

Get 10% off with code PATCHRIGHT

Documentation · Discord · Get an API key


Install it from PyPI

# Install Patchright with Pip from PyPI
pip install patchright
# Install Chromium-Driver for Patchright
patchright install chromium

Usage

Just change the import and use it like playwright. Patchright is a drop-in-replacement for Playwright!

# patchright here!
from patchright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto("http://playwright.dev")
    page.screenshot(path=f"example-{p.chromium.name}.png")
    browser.close()
import asyncio

# patchright here!
from patchright.async_api import async_playwright


async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch()
        page = await browser.new_page()
        await page.goto("http://playwright.dev")
        await page.screenshot(path=f"example-{p.chromium.name}.png")
        await browser.close()


asyncio.run(main())

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
    ...
)

Patches

Runtime.enable Leak

This is the biggest Patch Patchright uses. To avoid detection by this leak, patchright avoids using Runtime.enable by executing Javascript in (isolated) ExecutionContexts.

Console.enable Leak

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:


Documentation and API Reference

See the original Playwright Documentation and API Reference

Extended Patchright API

evaluate Method (Frame.evaluate, Page.evaluate, Locator.evaluate, Worker.evaluate, JSHandle.evaluate)

  • Added isolated_context to choose Execution Context (Main/Isolated). Bool (optional, Defaults to True)
object.evaluate(
    expression: str,
    arg: typing.Optional[typing.Any] = None,
    ...,
+   isolated_context: typing.Optional[bool] = True
)

evaluate_handle Method (Frame.evaluate_handle, Page.evaluate_handle, Locator.evaluate_handle, Worker.evaluate_handle, JSHandle.evaluate)

  • Added isolated_context to choose Execution Context (Main/Isolated). Bool (optional, Defaults to True)
object.evaluate_handle(
    expression: str,
    arg: typing.Optional[typing.Any] = None,
    ...,
+   isolated_context: typing.Optional[bool] = True
)

evaluate_all Method (Locator.evaluate_all)

  • Added isolated_context to choose Execution Context (Main/Isolated). Bool (optional, Defaults to True)
Locator.evaluate_all(
    expression: str,
    arg: typing.Optional[typing.Any] = None,
    ...,
+   isolated_context: typing.Optional[bool] = True
)

Bugs

The bugs are documented in the Patchright Driver Repository.


TODO

The TODO is documented in the Patchright Driver Repository.


Development

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.


© Vinyzu

Patchright is licensed Apache 2.0


Disclaimer

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.


Authors

Active Maintainer: Vinyzu
Co-Maintainer: Kaliiiiiiiiii

Metadata

Release files for patchright 1.64.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for patchright 1.64.1
File
patchright-1.64.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
patchright-1.64.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
patchright-1.64.1-py3-none-win32.whl Python 3 none Windows x86-32 Details
patchright-1.64.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
patchright-1.64.1-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
patchright-1.64.1-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details
patchright-1.64.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
patchright-1.64.1-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details

Total release size: 339.8 MB

Release files / patchright-1.64.1-py3-none-win_arm64.whl

Download URL patchright-1.64.1-py3-none-win_arm64.whl
Size 34.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
2b7aa403c2b0223adf210753277aae53f489ebe4208d78192450fb01b67d0f53
BLAKE2b-256 checksum
How to use checksums
81eeb192304784a40ebe18c4a713a0027ab245063ec5b7137562806be7a413d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-win_amd64.whl

Download URL patchright-1.64.1-py3-none-win_amd64.whl
Size 38.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3cd3e7e1e94034e3f3a732ef7d6f87376dc7d27a9b598de51565051acabf3428
BLAKE2b-256 checksum
How to use checksums
82a5f0d454cecbaef15c35574268ce6a4327f370788bb8e2da3a216cf5f9908f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-win32.whl

Download URL patchright-1.64.1-py3-none-win32.whl
Size 38.7 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
b630a5d8e80608d93d533ca278628a709d09bf5dc0b2a921c05b5a8baadbf503
BLAKE2b-256 checksum
How to use checksums
2e8db098f1f4056f07e90a89a556e292fef48b345ed5bd52bb6eb112de1c96cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL patchright-1.64.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 48.0 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2654f77810ad02980124bd8a7bc8d28658787b1583a94bcb2529faa612773992
BLAKE2b-256 checksum
How to use checksums
df10f00d4eba7f3b944a77cfcf04ce25262123021c9b56dfb0e0234d6546c724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-manylinux1_x86_64.whl

Download URL patchright-1.64.1-py3-none-manylinux1_x86_64.whl
Size 48.3 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
ff5f7e2f46b6cb26008e401a2c52d6ff09c1c09ba4b24e2c75bc501f62a3f084
BLAKE2b-256 checksum
How to use checksums
111a2822f0f5a530d47161cc78fa35381023831e1068749378ecff3eb54a766d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-macosx_11_0_universal2.whl

Download URL patchright-1.64.1-py3-none-macosx_11_0_universal2.whl
Size 44.3 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
08a4ad197d3f2e3739206255e11b7bff5948190fe6540f54be5fb4629f2361ff
BLAKE2b-256 checksum
How to use checksums
ee63b0e9a748c3b4d5f5bf5a671406a618c79f8e174718443a22517364a59e3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-macosx_11_0_arm64.whl

Download URL patchright-1.64.1-py3-none-macosx_11_0_arm64.whl
Size 43.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5cf5aa747646a2824cf4ca88a4f0a6c758865c4575c74cdef250d92b6fd76d44
BLAKE2b-256 checksum
How to use checksums
a4491ba8f64f2f4e1ad430af213ef3bbc3ac44d9e106f4ec20d3078a2f7e8b01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / patchright-1.64.1-py3-none-macosx_10_13_x86_64.whl

Download URL patchright-1.64.1-py3-none-macosx_10_13_x86_64.whl
Size 44.3 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
cfbff95e926b1a1a61339dc59da2e8f0236c2bc13c508959432532bbabeafbbd
BLAKE2b-256 checksum
How to use checksums
a2a019b2d80eedc22fd8935ee3a7c0ee627eed6443a521f62d98e5b950f23694
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page