Trying to make python selenium more stealthy.
Project description
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
Pyppeteer with stealth
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
selenium-stealth-1.0.0.tar.gz
(18.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file selenium-stealth-1.0.0.tar.gz.
File metadata
- Download URL: selenium-stealth-1.0.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdcfbc63a04acca3ac1e482adc9089e8b788f0351360a0d3cb917451dc4f3c88
|
|
| MD5 |
f5d08da5d4e307e63d78aafb72ba3dc4
|
|
| BLAKE2b-256 |
eec81df01a440853d8d7289fc9e55421b960904cd29128ad499f65093eeb11a0
|
File details
Details for the file selenium_stealth-1.0.0-py3-none-any.whl.
File metadata
- Download URL: selenium_stealth-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af015ae9eba330ee7dfa7b662be3bc1ca6392d3bde0e798fd43de128df826130
|
|
| MD5 |
99ee6d2f0a8a1496afec8969b7bff06d
|
|
| BLAKE2b-256 |
2694773b2fbec35c61bc944165c82c39da72a1bf826e90be501f90705ffb0ce9
|