Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

pyppeteer stealth

Project description

pyppeteer-stealth

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

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())

Test results

Pyppeteer without stealth

<figure class="image"><figcaption>headless</figcaption></figure> <figure class="image"><figcaption>headful</figcaption></figure>

Pyppeteer with stealth

<figure class="image"><figcaption>headless</figcaption></figure> <figure class="image"><figcaption>headful</figcaption></figure>

Project details


Release history Release notifications

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyppeteer-stealth, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pyppeteer_stealth-1.0.0.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page