Skip to main content

pyppeteerstealth

A bunch of hacks from different websites

Note!

If you know what is missing, please make a PR!!!

If you compare loading https://arh.antoinevastel.com/bots/ in your application, versus in your browser you might be able to see what is required to get the fingerprint closer to a "normal" browser (further away from a "headless" browser)

This is intended to be used with https://github.com/dgtlmoon/pyppeteer-ng and is also part of the https://changedetection.io project.

browser = await pyppeteer_instance.connect(browserWSEndpoint="ws://127.0.0.1:3000",
                                           ignoreHTTPSErrors=True
                                           )

self.page = (pages := await browser.pages) and len(pages) or await browser.newPage()
# Should be set with setUserAgent
user_agent = next((value for key, value in request_headers.items() if key.lower().strip() == 'user-agent'), DEFAULT_USER_AGENT)
await self.page.setUserAgent(user_agent)

try:
    from pyppeteerstealth import inject_evasions_into_page
except ImportError:
    logger.debug("pyppeteerstealth module not available, skipping")
    pass
else:
    await inject_evasions_into_page(self.page)

response = await self.page.goto("https://example.com", waitUntil="load")

Last report from https://bot.sannysoft.com/

last fingerprint status

Other related interesting projects/alternatives

Download files

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

Source Distribution

pyppeteerstealth-0.0.5.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyppeteerstealth-0.0.5-py2.py3-none-any.whl (10.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyppeteerstealth-0.0.5.tar.gz.

File metadata

  • Download URL: pyppeteerstealth-0.0.5.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyppeteerstealth-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4236a92742049aadf31eb6dd6900f93b98c3486a596676d2b1c7925457c9433b
MD5 5d3f0a2baf4ea3c9968b8a4fe0de43e0
BLAKE2b-256 0eb10827f4b6ccbd74d729159a3e9060152fc15fd8a6cda5f5c8d91b31df5256

See more details on using hashes here.

File details

Details for the file pyppeteerstealth-0.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyppeteerstealth-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5a934e16805fa982f736eaf86ccfbc959a4b8131bb5d3152ce310ab378641549
MD5 e4296abc8e2e3c821e4ff201be422ab2
BLAKE2b-256 7cfa20a8d3d92284f04c0a3be528f4e02aa979db1ba892f8f08c4f497a1503ce

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page