🎭 Playwright for Python
This is a patch of the original playwright implementation for Python.
It currently passes for sure (tested on Win10):
- ✅ [CloudFare]
- ✅ [Bet365] (shape//F5 I think)
- [Others] Unknown/Not tested
Warnings:
- the Only chromium part for Playwright is patched.
Demos (tested on Win 10)
Dependencies
- Google-Chrome installed (
channel="chrome"recommended, default)
Installation
From PyPi (recommended)
execute in your shell console
pip install undetected-playwright-patch
Installation note for UNIX//Linux
Resolve "Permission Denied" error (click to expand)
On UNIX-based OS, you might run into the following errors
Permission denied: '...python3.**/site-packages/undetected_playwright/driver/playwright.sh'
and
...python3.**/site-packages/undetected_playwright/driver/node: Permission denied
To resolve them, simply run
chmod +x <The path your terminal tells you>.sh
# so smth like: ...python3.**/site-packages/undetected_playwright/driver/playwright.sh
and
chmod +x <The path your terminal tells you for node>
# so smth like: ...python3.**/site-packages/undetected_playwright/driver/node
Build from this repo:
git clone https://github.com/kaliiiiiiiiii/undetected-playwright-python
cd undetected-playwright-python
python -m pip install -r local-requirements.txt
python build_patched.py
Example
import asyncio
# undetected-playwright here!
from undetected_playwright.async_api import async_playwright, Playwright
async def run(playwright: Playwright):
args = []
# disable navigator.webdriver:true flag
args.append("--disable-blink-features=AutomationControlled")
browser = await playwright.chromium.launch(headless=False,
args=args)
page = await browser.new_page()
await page.goto("https://nowsecure.nl/#relax")
input("Press ENTER to continue to Creep-JS:")
await page.goto("https://nowsecure.nl/#relax")
await page.goto("https://abrahamjuliot.github.io/creepjs/")
input("Press ENTER to exit:")
await browser.close()
async def main():
async with async_playwright() as playwright:
await run(playwright)
if __name__ == "__main__":
loop = asyncio.ProactorEventLoop()
loop.run_until_complete(main())
# asyncio.run(main) # should work for non-Windows as well
# undetected-playwright here!
from undetected_playwright.sync_api import sync_playwright
with sync_playwright() as p:
args = []
# disable navigator.webdriver:true flag
args.append("--disable-blink-features=AutomationControlled")
browser = p.chromium.launch(args=args, headless=False)
page = browser.new_page()
page.goto("https://nowsecure.nl/#relax")
input("Press ENTER to continue to Creep-JS:")
page.goto("https://nowsecure.nl/#relax")
page.goto("https://abrahamjuliot.github.io/creepjs/")
input("Press ENTER to exit:")
browser.close()
Documentation
See the original https://playwright.dev/python/docs/intro
API Reference
https://playwright.dev/python/docs/api/class-playwright
Patches
-
Runtime.enable- remove Runtime.enable occurences
- patch _context(world) getter
- isolatedWorld (utility)
- main world (main)
- reset on frame-reload//navigation
TODO's
- add GitHub runner to build releases automated
Metadata
Release files for undetected-playwright-patch 1.40.0.post1700587210000
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 233.8 MB
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-win_amd64.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-win_amd64.whl |
|---|---|
| Size | 29.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
582684aeb819e5dafa24d51b911d0c31b38572cd7259c33edb22e97e33ac69be
|
|
BLAKE2b-256 checksum How to use checksums |
518ac84ada6cd6782f3fb1c85e3666905b349a4e959599e8cf91920491c260da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-win32.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-win32.whl |
|---|---|
| Size | 29.4 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
66ffac57cf030a15b26298fcf1325ab78eed0d2dc0862060c9a773cc67e4b72e
|
|
BLAKE2b-256 checksum How to use checksums |
1e16da185e6468168026073f416045b2455018be1b61924e9970e76ec0881d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 37.0 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0d38ca63b7b70a580b30c2cbc561bdb3742488a0ffb121a460cc6962880acaba
|
|
BLAKE2b-256 checksum How to use checksums |
1777d3f8b768f509fcb87275e09e4d3efc871fd5e08e092e4a1c6fc8a166fada
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-manylinux1_x86_64.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 37.2 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
49880db7ad177b35f0f53ed9cc09bbddad19c4e7a712cb0bfbb285363056b2fa
|
|
BLAKE2b-256 checksum How to use checksums |
8faf1721c34e7f8e9732527ea669b30cde4e8b0ad6836f2b6c10068da3db7d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_11_0_universal2.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_11_0_universal2.whl |
|---|---|
| Size | 34.2 MB |
| Tags | Python 3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
8c89e5e21d22788c446daf4459368aeb2167c2c5e8b3edfa72088c27ca8eb8fe
|
|
BLAKE2b-256 checksum How to use checksums |
62e12245ecf809be5e4e9bd60e825a261ae9a77af2dee175fd94e04095dfb012
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_11_0_arm64.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 32.5 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c235d8282b309dbe32bf0a59d5aa521c698a01ec7422f552842c24443aa0ef97
|
|
BLAKE2b-256 checksum How to use checksums |
965def73b7c5bbc56256c3ca477671ca00a89230e9ad6a2a3cb4c9452bf4ca19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_10_13_x86_64.whl
| Download URL | undetected_playwright_patch-1.40.0.post1700587210000-py3-none-macosx_10_13_x86_64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | Python 3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed50ec6cdff1651b754dc80b6935b0e871e0cb2e45837909158531ae93666ee6
|
|
BLAKE2b-256 checksum How to use checksums |
a8aa7a66403083577595343f8bbdaa54977c0fb05a3dd32ca3f5461df51481be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for undetected-playwright-patch 1.40.0.post1700587210000
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.