Skip to main content

🎭 Patchright Python


Patchright Version GitHub Downloads (all assets, all releases)

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

Thordata Banner

Thordata - Your First Plan is on Us! 💰Get 100% of your first residential proxy purchase back as wallet balance, up to $900.

⚡ Why Thordata?

🌍 190+ real residential & ISP IP locations
🔐 Fully encrypted, ultra-secure connections
🚀 Optimized for web scraping, ad verification & automation workflows

🔥Don’t wait — this is your best time to start with Thordata and experience the safest, fastest proxy network.


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 phantomwright-driver 1.58.3

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

Total release size: 324.4 MB

Release files / phantomwright_driver-1.58.3-py3-none-win_arm64.whl

Download URL phantomwright_driver-1.58.3-py3-none-win_arm64.whl
Size 33.1 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
c26da60d751e904d792498f78b92bc7d1eb466f4c54f4fb0e3d9845728a274a3
BLAKE2b-256 checksum
How to use checksums
f89b88c99d69c1f0d34636b3875751f552f982b7ddb8ae3da10c76beb3253dea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-win_amd64.whl

Download URL phantomwright_driver-1.58.3-py3-none-win_amd64.whl
Size 36.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2fcd9274f6a1153f40cd36b48ca8232a31406bd88cfdd9197e3e885e562b4d81
BLAKE2b-256 checksum
How to use checksums
e294b88c9376544bd833cb327704cfa692e4bd5c85526cbebf01e39c6eda739c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-win32.whl

Download URL phantomwright_driver-1.58.3-py3-none-win32.whl
Size 36.8 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
df8666be9caf060cecdc7ac1e6b9790a88e7f877905663c71e6da38319e59fbe
BLAKE2b-256 checksum
How to use checksums
c1ecdc6a0bc956c9c751fcc9e9f4e846657520cc832e11a2c688d9740fee1e4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL phantomwright_driver-1.58.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 46.0 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2cf713d19821b0d56ec558b45e7e9ae1ce8db7b68d0f82d00bd010b0293dc0c9
BLAKE2b-256 checksum
How to use checksums
6b147f04ee29bf074c2ca21a177bd804875f2ee3d6c758fe9c6c7e1848520bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-manylinux1_x86_64.whl

Download URL phantomwright_driver-1.58.3-py3-none-manylinux1_x86_64.whl
Size 46.2 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7ae174da1395f5021f0136fabdd76b0b9a372274f35353c1ee8b57fd81d60243
BLAKE2b-256 checksum
How to use checksums
7ab0eca4ee5f51fd62307d580b1425fabe0146f928d3a8fda5bdda5636a89f67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-macosx_11_0_universal2.whl

Download URL phantomwright_driver-1.58.3-py3-none-macosx_11_0_universal2.whl
Size 42.2 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
df641891c2527f21130a27dee5e491041acb91c691361f98cfed91c6af34bbf2
BLAKE2b-256 checksum
How to use checksums
bb6caec4439ee0f0e2bdc8bc92439d3819d50f1f8c15fd475c292ebf5ff4240e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-macosx_11_0_arm64.whl

Download URL phantomwright_driver-1.58.3-py3-none-macosx_11_0_arm64.whl
Size 41.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83bbbe3fc780d102fb2a79fda04e80b73e9848d200d340896c90feffa56c7244
BLAKE2b-256 checksum
How to use checksums
26f4006d05af2554091416bbea807304f013f3dcf5a547067d3772d583b5c1f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / phantomwright_driver-1.58.3-py3-none-macosx_10_13_x86_64.whl

Download URL phantomwright_driver-1.58.3-py3-none-macosx_10_13_x86_64.whl
Size 42.2 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
0a7003e75e7fe360597bdf69bc19743f5694a79f8b8047739ff8cce1f1504e30
BLAKE2b-256 checksum
How to use checksums
dff9c9f3f930b4abe77617204dc396606c7fe16a7c5f12e9bd67cc2c91152ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Security for phantomwright-driver 1.58.3

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 phantomwright_driver-1.58.3-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 Mar 11, 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.

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