This release is a pre-release and may not be stable for production use.
Thespis
Make Playwright automation undetectable
Note: This project is currently in beta. Features are stable but may change based on feedback.
Why Use Thespis?
Websites detect Playwright because of navigator.webdriver and other automation signals.
Results: Tested against CreepJS:
| Metric | Real Browser | With Thespis | Without Thespis |
|---|---|---|---|
| Like Headless | 25% | 31% | 44% |
| Headless Detection | 0% | 0% | 33% |
Quick Start
Basic Example (Sync)
from playwright.sync_api import sync_playwright
from thespis import stealth_sync
with sync_playwright() as p:
# Launch browser with special flag (REQUIRED!)
browser = p.chromium.launch(
headless=False,
args=['--disable-blink-features=AutomationControlled']
)
# Create page and apply stealth
page = browser.new_page()
stealth_sync(page)
page.goto("https://bot.sannysoft.com")
page.screenshot(path="test.png")
browser.close()
Important: Required Flag
This flag is CRITICAL:
args=['--disable-blink-features=AutomationControlled']
Without it, navigator.webdriver stays true and detection fails.
Docker (Production)
For servers without displays, use Docker with Xvfb:
# Build image
docker-compose build
# Run test script
docker-compose run --rm thespis
# Run your own script
docker-compose run --rm thespis python your_script.py
Why Docker?
- Runs
headless=Falseon servers (31% detection score) - No visible windows (uses virtual display)
Recommended Full Configuration
# Launch browser
browser = p.chromium.launch(
headless=False,
args=[
'--disable-blink-features=AutomationControlled',
'--disable-dev-shm-usage',
'--no-sandbox',
]
)
# Create realistic context
context = browser.new_context(
viewport={'width': 1366, 'height': 768},
user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
locale='en-US',
timezone_id='America/New_York',
)
page = context.new_page()
stealth_sync(page)
Metadata
Release files for thespis 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thespis-0.1.0b1.tar.gz | 77.2 kB | Without provenance | Details for thespis-0.1.0b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thespis-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details for thespis-0.1.0b1-py3-none-any.whl |
Total release size: 96.0 kB
Release files / thespis-0.1.0b1.tar.gz
| Download URL | thespis-0.1.0b1.tar.gz |
|---|---|
| Size | 77.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
894ff05e2500705b9e984c4ad9745d8021c1cb2c9f9c2250509296589fc20864
|
|
BLAKE2b-256 checksum How to use checksums |
011e1c0b5dddfe10e567f84980b56412f69cebbff174e817071f1e27839cd035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / thespis-0.1.0b1-py3-none-any.whl
| Download URL | thespis-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2582e2b276d59f9c924c3942da130df005b6cbb913f682b7149e72fce65323c
|
|
BLAKE2b-256 checksum How to use checksums |
ea4e6beaefa06e003e0840e96f9619ca8c830cf098f51cc8633e960ab8aae101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for thespis 0.1.0b1
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.