Random User Agents
Random User Agents is a python library that provides list of user agents, from a collection of more than 326,000+ user agents, based on filters.
Some of the filter names which can be passed to UserAgent() are listed below:
operating_systems : [
UNIX, LINUX, WINDOWS, MAC, ...
]
hardware_types : [ MOBILE, COMPUTER, SERVER, ...
]
software_types : [
WEB_BROWSER, BOT__CRAWLER, BOT__ANALYSER, ...
]
software_names : [
EDGE, CHROME, CHROMIUM, ANDROID, FIREFOX, OPERA, ...
]
software_engines : [
BLINK, GECKO, WEBKIT, ...
]
popularity : [
POPULAR, COMMON, AVERAGE, ....
]
All filters are available in random_user_agent.params
Installation
You can install random_useragent by running the following command:
pip install solotop999_random_user_agent
Or you can download direct from Github and install it manually.
UsageTo get 100 user agents of browser chrome based on operating systems windows or linux
from random_user_agent.user_agent import UserAgent
from random_user_agent.params import SoftwareName, OperatingSystem
# you can also import SoftwareEngine, HardwareType, SoftwareType, Popularity from random_user_agent.params
# you can also set number of user agents required by providing `limit` as parameter
software_names = [SoftwareName.CHROME.value]
operating_systems = [OperatingSystem.WINDOWS.value, OperatingSystem.LINUX.value]
user_agent_rotator = UserAgent(software_names=software_names, operating_systems=operating_systems, limit=100)
# Get list of user agents.
user_agents = user_agent_rotator.get_user_agents()
# Get Random User Agent String.
user_agent = user_agent_rotator.get_random_user_agent()
License
The MIT License (MIT). Please see License File for more information.
Special thanks to @Luqman-Ud-Din.
Metadata
Release files for solotop-random-user-agent 0.69.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solotop_random_user_agent-0.69.1.tar.gz | 8.2 MB | Without provenance | Details for solotop_random_user_agent-0.69.1.tar.gz |
Release files / solotop_random_user_agent-0.69.1.tar.gz
| Download URL | solotop_random_user_agent-0.69.1.tar.gz |
|---|---|
| Size | 8.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c3cb742c83f10d4340413b90b037b82cbdbc21bcc781a3c618d3a552c5d461d
|
|
BLAKE2b-256 checksum How to use checksums |
a4949dfc84b735b84c107216b58d8247eb287aab1c804144e7ced1109ef819fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Security for solotop-random-user-agent 0.69.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.