A random user-agent generator
Project description
ua-generator
A random user-agent generator for Python >= 3.6
Features
- No external user-agent list. No downloads.
- Templates are hardcoded into the code.
- Platform and browser versions are based on real releases.
Installing
pip3 install ua-generator
Basic usage
import ua_generator
ua = ua_generator.generate()
print(ua)
# Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/15.2 Safari/604.1.38
Customization
import ua_generator
ua = ua_generator.generate(platform=('ios', 'macos'), browser='safari')
print(ua)
# Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38
ua = ua_generator.generate(device='mobile', browser=('safari', 'chrome'))
print(ua)
# Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1.38
ua = ua_generator.generate(device='desktop', browser='firefox')
print(ua)
# Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
Author
Ekin Karadeniz (iamdual@icloud.com)
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
ua-generator-0.1.2.tar.gz
(13.1 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 ua-generator-0.1.2.tar.gz.
File metadata
- Download URL: ua-generator-0.1.2.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa1c9d73dc530e34ddd4daa7a4b636e15724eb3ec32d269ab4b282aba71ea76d
|
|
| MD5 |
b6658b0f7f5d5a2377d098213386ed3c
|
|
| BLAKE2b-256 |
84b02ceaf3620dae98ffa87d6a8744a155ac67f1229ba125a1dcb7970bffe0ce
|
File details
Details for the file ua_generator-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ua_generator-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff864c8d285370498f88d0c2c37339d7e160f56773a8f726cd5afc287b22dff
|
|
| MD5 |
ec7949082f99521081415e12ae8beabe
|
|
| BLAKE2b-256 |
350b94bee6424165ef358a9b7826003570e67855f33aca627bec191b93b45d76
|