Makes playwright stealthy like a ninja!
Project Links
Meta
Requires Python: >=3.9,<4.0
Classifiers
License
- OSI Approved :: MIT License
Programming Language
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
🥷🏻 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 |
|---|---|
![]() |
![]() |
1.2.0
Jun 13, 2025
1.1.5
Jun 12, 2025
1.1.3
Jun 12, 2025
1.1.2
Feb 22, 2025
1.1.1
Jan 30, 2025
1.1.0
Nov 16, 2024
1.0.3
Nov 07, 2024
1.0.2
Oct 30, 2024
1.0.1
Oct 30, 2024
1.0.0
Oct 30, 2024
0.0.6
Oct 17, 2024
0.0.5
Sep 14, 2024
0.0.4
Sep 04, 2024
0.0.3
Sep 04, 2024
0.0.2
Sep 03, 2024
0.0.1
Mar 07, 2024

