A package to get random user agents based filters provided by user
Project description
Random User Agents
Random User Agents is a python library that provides list of user agents, from a collection of more than 180,000+ user agents, based on filters.
Filter names which can be passed to UserAgent()
are listed below:
operating_systems : [
'a-unix-based-os', 'haiku', 'webos', 'bada', 'symbian', 'windows-phone', 'freebsd',
'macos', 'ios', 'windows', 'blackberry-os', 'mac', 'windows-mobile', 'linux', 'sunos',
'beos', 'fire-os', 'chromeos', 'openbsd', 'android', 'mac-os-x', '---'
]
hardware_types : [
'mobile -> tablet', 'mobile', 'mobile -> ebook-reader', 'mobile -> music-player', 'computer',
'large-screen -> media-player', 'mobile -> phone', 'mobile -> handheld-game', 'server',
'large-screen -> game-console', 'large-screen -> tv', '---'
]
software_types : [
'application -> software-library', 'bot -> analyser', 'bot -> site-monitor',
'browser -> web-browser', 'bot -> crawler', '---'
]
software_names : [
'qupzilla', 'opera-mini', 'catchpoint-analyser', 'yandex-search-bot', 'internet-channel', 'netsurf',
'alertsite-monitoring-bot', 'nokia-browser', 'edge', 'cosmos-crawler', 'rockmelt', 'opera', 'skyfire',
'k-meleon', 'pale-moon', 'uc-browser', 'yandex-browser', 'netscape-navigator', 'internet-archiver-bot',
'internet-tv-browser', 'awesomium', 'chromium', 'webtv', 'unknown-browser', 'onebrowser', 'firefox',
'android-browser', 'webkit-based-browser', 'obigo', 'yodaobot-search-bot', 'blackberry-browser',
'firefox-focus', 'omniweb', 'dotcom-monitor-bot', 'speedcurve-speed-tester', 'chrome',
'google-app-engine-software', '---'
]
software_engines : [
'Goanna', 'Gecko', 'Blink', 'Presto', 'WebKit', '---'
]
Installation
You can install random_useragent by running the following command:
pip install random_user_agent
Or you can download direct from Github and install it manually.
Usage
To get user agents of browser chrome
based on operating systems windows
or linux
from random_user_agents.user_agent import UserAgent
user_agent_rotator = UserAgent(software_names=['chrome'], operating_systems=['windows', 'linux'])
# 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()
# list all available operating systems
operating_systems = user_agent_rotator.get_operating_systems()
# list all available software names
operating_systems = user_agent_rotator.get_software_names()
# list all available software rendering engines
operating_systems = user_agent_rotator.get_software_engines()
# list all available software types
operating_systems = user_agent_rotator.get_software_types()
# list all available hardwrae types
operating_systems = user_agent_rotator.get_hardware_types()
License
The MIT License (MIT). Please see License File for more information.
User Agents Source
special thanks to whatismybrowser for providing real user agents.
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
Built Distribution
Close
Hashes for random_user_agent-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb1b95c73aeff9a6050914cac95f1ef0f6a80b928bb47118d3af112fbae8516 |
|
MD5 | f0da4e8d7e996bd3be651115e0072f65 |
|
BLAKE2b-256 | 018c8773b95146a1a9bfacb45f617dc3e70f4d6cacfc34ee12cdea6a0dd1eca5 |