Skip to main content

playwright_stealth

Transplanted from puppeteer-extra-plugin-stealth, Not perfect.

Install

$ pip install playwright-stealth

Usage

sync

from playwright.sync_api import sync_playwright
from playwright_stealth import stealth_sync

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        stealth_sync(page)
        page.goto('http://whatsmyuseragent.org/')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()

async

# -*- coding: utf-8 -*-
import asyncio
from playwright.async_api import async_playwright
from playwright_stealth import stealth_async

async def main():
    async with async_playwright() as p:
        for browser_type in [p.chromium, p.firefox, p.webkit]:
            browser = await browser_type.launch()
            page = await browser.new_page()
            await stealth_async(page)
            await page.goto('http://whatsmyuseragent.org/')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.get_event_loop().run_until_complete(main())

Test results

playwright with stealth

playwright without stealth

playwright without stealth

playwright with stealth

Metadata

Release files for playwright-stealth-plus 1.0.601

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for playwright-stealth-plus 1.0.601
File Size Uploaded Provenance Actions
playwright_stealth_plus-1.0.601.tar.gz 20.0 kB Without provenance Details for playwright_stealth_plus-1.0.601.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for playwright-stealth-plus 1.0.601
File Interpreter ABI Platform Actions
playwright_stealth_plus-1.0.601-py3-none-any.whl Python 3 none any Details for playwright_stealth_plus-1.0.601-py3-none-any.whl

Total release size: 48.6 kB

Release files / playwright_stealth_plus-1.0.601.tar.gz

Download URL playwright_stealth_plus-1.0.601.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2b7972563cc92441581c3072058c6f286d0354dde212c5d9ac8b913a3960ce8a
BLAKE2b-256 checksum
How to use checksums
9d35298c153c90ef11d103b7bca9f2fad366e529857932d11b7b1259cb73e378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / playwright_stealth_plus-1.0.601-py3-none-any.whl

Download URL playwright_stealth_plus-1.0.601-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c7f5b586a1d25552650fa007ee11a105d9dc4e5fdeb990dc898eab12ba75551
BLAKE2b-256 checksum
How to use checksums
1eff9206cdbe7be5a6497ff56e1283df46a0ffa875f390db641aa706e6df9463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for playwright-stealth-plus 1.0.601

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.

Release history Release notifications | RSS feed

This release

1.0.601 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page