Skip to main content

gets random useragent

Project description

provides random useragent string taken from useragents.me

methods:

get_useragent(env='desktop')
    returns a useragent string for the specified environment, sampled according to the probability occurring in the wild

get_useragents(env='all')
    returns a dict:list:dict of useragents (the keys are the environments)
    the returned lists contain dicts with keys share (percentage of all agents), os + browser, and useragent. some dicts also have a device key.

    if env='desktiop' (or mobile, linux, android, iphone, tablet) is specified, a list:dict fir the specified environment is returned

example usage:

from randomuseragent import ua
agent=ua()
agent.get_user_agent()
# 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.10 Safari/605.1.1'

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

randomagent-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

randomagent-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file randomagent-0.0.1.tar.gz.

File metadata

  • Download URL: randomagent-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for randomagent-0.0.1.tar.gz
Algorithm Hash digest
SHA256 05ee28b7d8a607c3ddffb796ab79848820008a880b20a4f3cd377b44566fc76b
MD5 89ddcff486cfeb33d3703fbabef2978f
BLAKE2b-256 1f29db843a119261663b6a563d7bb84ff03e7836dd89aa78ebff8f2354cb4c77

See more details on using hashes here.

File details

Details for the file randomagent-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for randomagent-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adbd213ac8ae89ac0f486c4c37715b3524d62303b9f6837bf0e7444e9cc75491
MD5 21f2f71cd893ffdb0954043304380e2d
BLAKE2b-256 8c2cd4b59c03d763f9195f0786bce825a5c420e9395d1fa1be1666e1ece8bb08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page