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.
Check Nodemaven's new GitHub for more web scraping and automation solutions - https://github.com/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.4

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.4
File Actions
patchright-1.64.4-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for patchright-1.64.4-py3-none-win_arm64.whl
patchright-1.64.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for patchright-1.64.4-py3-none-win_amd64.whl
patchright-1.64.4-py3-none-win32.whl Python 3 none Windows x86-32 Details for patchright-1.64.4-py3-none-win32.whl
patchright-1.64.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for patchright-1.64.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
patchright-1.64.4-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for patchright-1.64.4-py3-none-manylinux1_x86_64.whl
patchright-1.64.4-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details for patchright-1.64.4-py3-none-macosx_11_0_universal2.whl
patchright-1.64.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for patchright-1.64.4-py3-none-macosx_11_0_arm64.whl
patchright-1.64.4-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for patchright-1.64.4-py3-none-macosx_10_13_x86_64.whl

Total release size: 341.0 MB

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

Download URL patchright-1.64.4-py3-none-win_arm64.whl
Size 34.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
0d677dae50f11adf07aa984aa4b40393e647edb91de9ddd2d9f1e32096cefebc
BLAKE2b-256 checksum
How to use checksums
d6f93c57e324fc8151cdf1c33ed7efc2e35b5eb68b878c0f8d18cc4b85f74501
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

Download URL patchright-1.64.4-py3-none-win_amd64.whl
Size 38.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
91ede516076a12196def89ff89ee7eb30deea4ba074ca136f1022d59e98b0352
BLAKE2b-256 checksum
How to use checksums
029dafafea2ed5e504552cedad97573901493e8f336b1cdcf7680a5be3100f4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

Download URL patchright-1.64.4-py3-none-win32.whl
Size 38.8 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
03b61db0b05b539590db076af67ccde4199b10a8c765dcb03a7b5e653147354c
BLAKE2b-256 checksum
How to use checksums
cd8f7a00bbf88349bad7e036ff1986102ac66e4288a7a4c98237ef0a3c3d6c75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

Download URL patchright-1.64.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 48.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
93d719dd6a2921b553725611d56d53aee85f7c46d4d6eff220b71b8175ff9534
BLAKE2b-256 checksum
How to use checksums
313b2f5a7fea04047389c063f1a2b2a77db0d53acd2cf1d339d7b74dd4718f4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

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

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 Nov 2, 2026.

Transparency log

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

Download URL patchright-1.64.4-py3-none-macosx_11_0_universal2.whl
Size 44.5 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
55be6d79e9db4f4a886375d14961238ae182ec43d1ef56157a017722f30ea3f7
BLAKE2b-256 checksum
How to use checksums
13ded217d9ff8a19a52506e510dcfa5b323b637c1ddd30b9792d0e5104e4d9cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

Download URL patchright-1.64.4-py3-none-macosx_11_0_arm64.whl
Size 43.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e8656d523df868304ca25b77c2a94f17fe9e582085d46a1e2c2d25469d66f7a9
BLAKE2b-256 checksum
How to use checksums
0e6fd0b86e929c8ddcda7db8ff729e0001454bc471e7b6b19dc9ed330d13c2a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

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

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

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 Nov 2, 2026.

Transparency log

Security for patchright 1.64.4

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for patchright-1.64.4-py3-none-win_arm64.whl

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 Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.64.4 This release

8 release files Full provenance

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