Undetected version of botright
Project description
🎭 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.
- This will overwrite your default playwright package.
Note: For testing with Playwright and undetected-playwright, use multiple venv's
Demos (tested on Win 10)
Dependencies
- Google-Chrome installed (
channel="chrome"
recommended)
Installation
From PyPi (recommended)
execute in your shell console
pip install unetected-playwright-patch
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 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(channel="chrome", 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 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, channel="chrome")
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
- make setup.py compatible for pypi uploads
- add GitHub runner to build releases automated
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed016d3de10a7cbe32d608715b125ffb8c6f7ac53741ccf325e91fffab7cfe9b |
|
MD5 | ec6289255c079e43a6816483ef4cc116 |
|
BLAKE2b-256 | cf84e102cc30a08e1516a1ac567730628f2de3c31d76e872631d4871eef2cb22 |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d06f32f90abde15ff84456b2f5f4da684f2d97b30c8eb175d9e6955305cf6efc |
|
MD5 | fd35204641d1432e224fe408ff74d388 |
|
BLAKE2b-256 | a8cca165f61b41d5d2c986644ad7445cbc47c31435805ca1635de5dd6a556290 |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 978b1e7382d62af5471f5fc1de2b21d3fafb19eaa749d2379d19ef8856cc2703 |
|
MD5 | 1e7b91671195984b1f4a222c4b121387 |
|
BLAKE2b-256 | 55361590fdba1989c18cf3bce71cd221b0b1bae9927021d8c2b1597f7028d124 |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f5e3e6a5a07053fd73acad4098671688d26e7d5e2a5a7db0a22be3edc140a09 |
|
MD5 | 18dc68ac6ef5e574304031e07534bbad |
|
BLAKE2b-256 | 191323c1ea31b22542be1460d198b38bc298765e3a24b6279eb5ac0212aff87d |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-macosx_11_0_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d13d4f95a06f9d44d0f7ab951a8c49811bdf84c1bc79d61dc6d1d1ab8ba3c3d5 |
|
MD5 | 071946b2c798bba3e35e29648ff16d08 |
|
BLAKE2b-256 | ef48e2147f5a8f5e66f56646396915539158e68f16607938c057f9733498e185 |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9753e85c097a316f4fadab82f7356febe06732ebe2b6396449f35a2b20162ce6 |
|
MD5 | 24ffb64ec9b507680b66cf4beb2a38c9 |
|
BLAKE2b-256 | 02c21986b7ccf0326401d1f1ffe8976449728706f33f88188eea98d01eff2523 |
Close
Hashes for undetected_playwright_patch-0.0.1.1-py3-none-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78505695cdc8f75a18844c8bab7788d40fe3ed800edf58b005daff7ec3b79e2 |
|
MD5 | 34cd90790005241a347b044e8d18ed5f |
|
BLAKE2b-256 | 0d8f970d73b2bb540ffeef283a89ef73aec57ac77b098f618af6159d00596ccc |