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.1.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.1.tar.gz.
File metadata
- Download URL: ua-generator-0.1.1.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.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 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 |
6d521596d076620f8b7262cfec1e95a8ec8db0e7a8bbed866f1342bd4faa1049
|
|
| MD5 |
9ea5be2cb7b295bd9d1db9e856cc39ca
|
|
| BLAKE2b-256 |
fc234d9ed7148302e13c3bda0426277a6032c6071ad4bd6dbd447e15856ac81d
|
File details
Details for the file ua_generator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ua_generator-0.1.1-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.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 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 |
8aa5c93799c30f5d07bbdafdff42e0ff95b76f362140f7de59ce50d9dabe268f
|
|
| MD5 |
6e39898b4b6002027b5ff8790a0b380b
|
|
| BLAKE2b-256 |
cd7ab82a18c3c98f749c04d0c8e49b62eb1ccc7324052821dbd8c34e27985d00
|