Create uniq selenium webdriver.
Project description
Selenium Uniq Driver
It is impossible to imagine modern web resources without validation of incoming traffic. A lot of different validation methods are using for user detection such as IP, canvas fingerprint, user-agent, etc. For us, who want to automate our web journey it is a challenge to avoid site fingerrinting. The selenium-uniq-driver package is created to prevent blocking when using selenium library.
Features
- Create stealthy webdriver
- Uniq browser user-agent, language and platform
- Choose device type and change resolution
- Generate random WebGL data
- Change your timezone
- Spoof audio and canvas fingerprints
Additionaly to randomly generated device data the selenium-stealth library is in use which allows you prevent almost all selenium detections.
Install
Selenium-uniq-driver is available on PyPI you can install with pip.
pip install selenium-uniq-driver
Usage
from selenium_uniq_driver import UniqDriver, HardwareType, SoftwareName, OperatingSystem
driver_creator = UniqDriver(hardware_type=HardwareType.MOBILE, software_name=SoftwareName.CHROME, operating_system=OperatingSystem.ANDROID)
# driver_creator.set_proxy("host", "port", "login", "password", "http")
entropy_methods = [
"user_agent_and_language",
"device_viewport",
"device_webgl",
"device_timezone",
"canvas_fingerprint",
"audio_fingerprint"
]
driver = driver_creator.create(entropy_methods)
driver.get("https://bot.sannysoft.com/")
input("\nPress Enter to exit...")
driver.quit()
Explanation
Use UniqDriver class to create your webdriver. You should pass device information into construstor using enum classes HardwareType, SoftwareName and OperatingSystem. For now only Chrome supports.
driver_creator = UniqDriver(hardware_type=HardwareType.MOBILE, software_name=SoftwareName.CHROME, operating_system=OperatingSystem.ANDROID)
You can add proxy data if you want by using set_proxy method
driver_creator.set_proxy("host", "port", "login", "password", "http")
Choose which device data you want to randomize by passing entropy params into create method. If entropy_methods doesn't provided will be used all existed.
entropy_methods = [
"user_agent_and_language",
"device_viewport",
"device_webgl",
"device_timezone",
"canvas_fingerprint",
"audio_fingerprint"
]
driver = driver_creator.create(entropy_methods)
Future Developments
- Increase uniqueness for existed entropy methods
- Add new spoofing mechanisms, like Font Fingerprint etc.
License
Copyright © 2025, AlexanderTsk. Released under the MIT License.
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
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_uniq_driver-1.0.5.tar.gz.
File metadata
- Download URL: selenium_uniq_driver-1.0.5.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac51b3910385c476e487e5c3e6e1e233233c4c4f16d339db02e1b8aaf437b38
|
|
| MD5 |
6b39e7336190fcb6ab02931bc9eda6fb
|
|
| BLAKE2b-256 |
3c39ab64ac1f4d83b151472c64da0d6fef1b09b287e6be5cb54731adc3080286
|
File details
Details for the file selenium_uniq_driver-1.0.5-py3-none-any.whl.
File metadata
- Download URL: selenium_uniq_driver-1.0.5-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4527e1db35705c09d69201d3372bc7a5e605cd1c1c8707ee27e907c883140531
|
|
| MD5 |
8456bb53e4f350a85fb07236078456ad
|
|
| BLAKE2b-256 |
1abc48876a863b15aa9cffa22782253d2fb39b68dad3d624a2f24a02ec929acd
|