A general collection of robot-evading tweaks for pyppeteer-ng
Project description
pyppeteerstealth
A bunch of hacks from different websites
Does not yet pass https://arh.antoinevastel.com/bots/areyouheadless
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()
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)
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for pyppeteerstealth-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fe2a8383dc8241e9d73f43ffccf9067745e6139da96e4b6c340191c9603a9c5 |
|
MD5 | b88bfa6cff915bf66f602a7065b09db8 |
|
BLAKE2b-256 | 175713dac85e999e8743ea73017cb554a20fbde905a771bed37af9dba1dce317 |