🥷🏻 tf-playwright-stealth

Transplanted from puppeteer-extra-plugin-stealth.
This is a package that makes playwright stealthy like a ninja by spoofing browser features in order to reduce the chance of detection.
Install
pip install tf-playwright-stealth
Usage
sync
from playwright.sync_api import sync_playwright
from playwright_stealth import stealth_sync
with sync_playwright() as p:
browser = p.chromium.launch(
headless=True,
)
page = browser.new_page()
stealth_sync(page)
page.goto("https://bot.sannysoft.com/")
page.screenshot(path=f"example_with_stealth.png", full_page=True)
browser.close()
async
from playwright.async_api import async_playwright
from playwright_stealth import stealth_async
with async_playwright() as p:
browser = await p.chromium.launch(
headless=True,
)
page = await browser.new_page()
await stealth_async(page)
await page.goto("https://bot.sannysoft.com/")
await page.screenshot(path=f"example_with_stealth_async.png", full_page=True)
await browser.close()
Results
From bot.sannysoft.com
| Headless | Headful |
|---|---|
Release files for tf-playwright-stealth 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tf_playwright_stealth-1.2.0.tar.gz | 23.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tf_playwright_stealth-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.5 kB
Release files / tf_playwright_stealth-1.2.0.tar.gz
| Download URL | tf_playwright_stealth-1.2.0.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bb8d32d3e60324fbf6b9eeae540b8cd9f3b9e07baeb33b025dbc98ad47658ba
|
|
BLAKE2b-256 checksum How to use checksums |
d66b32bb58c65991f91aeaaf7473b650175d9d4af5dd383983d177d49ccba08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Darwin/24.5.0
|
Release files / tf_playwright_stealth-1.2.0-py3-none-any.whl
| Download URL | tf_playwright_stealth-1.2.0-py3-none-any.whl |
|---|---|
| Size | 33.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26ee47ee89fa0f43c606fe37c188ea3ccd36f96ea90c01d167b768df457e7886
|
|
BLAKE2b-256 checksum How to use checksums |
113d2653f4cf49660bb44eeac8270617cc4c0287d61716f249f55053f0af0724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Darwin/24.5.0
|