Skip to main content

pyppeteer-stealth

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

Install

$ pip install pyppeteer_stealth

Usage

import asyncio
from pyppeteer import launch
from pyppeteer_stealth import stealth

async def main():
    browser = await launch(headless=True)
    page = await browser.newPage()

    await stealth(page)  # <-- Here

    await page.goto("https://bot.sannysoft.com/")
    await browser.close()
asyncio.get_event_loop().run_until_complete(main())

Args

stealth(
  page: Page,
  run_on_insecure_origins: bool = False,
  languages: [str] = ["en-US", "en"],
  vendor: str = "Google Inc."
  user_agent: str = None,
  language: str = "en-US,en",
  platform: str = "Win32",
  webgl_vendor: str = "Intel Inc.",
  renderer: str = "Intel Iris OpenGL Engine",
)

Test results

Pyppeteer without stealth

headless
headful

Pyppeteer with stealth

headless
headful

Metadata

Release files for selenium-stealth 1.0.0

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

Source distribution (sdist)

Source distribution for selenium-stealth 1.0.0
File Size Uploaded
selenium-stealth-1.0.0.tar.gz 18.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for selenium-stealth 1.0.0
File Interpreter ABI Platform
selenium_stealth-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.7 kB

Release files / selenium-stealth-1.0.0.tar.gz

Download URL selenium-stealth-1.0.0.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bdcfbc63a04acca3ac1e482adc9089e8b788f0351360a0d3cb917451dc4f3c88
BLAKE2b-256 checksum
How to use checksums
eec81df01a440853d8d7289fc9e55421b960904cd29128ad499f65093eeb11a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.8

Release files / selenium_stealth-1.0.0-py3-none-any.whl

Download URL selenium_stealth-1.0.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af015ae9eba330ee7dfa7b662be3bc1ca6392d3bde0e798fd43de128df826130
BLAKE2b-256 checksum
How to use checksums
2694773b2fbec35c61bc944165c82c39da72a1bf826e90be501f90705ffb0ce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.8

Release history Release notifications | RSS feed

1.0.6

1 release file

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

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