Skip to main content

generate random user-agent

Project description

random-useragent

This is a package to generate random user-agent. support simulating windows, linux, mac, android and simulating multiple browser clients.

how to install

python3 -m pip install r-useragent

how to use

reference examples folder

from random_useragent import UserAgent

u = UserAgent()

# generate android user-agent
print(u.android())  # random
print(u.android(app="app"))
print(u.android(app="webview"))
print(u.android(app="uc"))
print(u.android(app="baidu"))
print(u.android(app="qq"))
print(u.android(app="wechat"))


# generate iphone user-agent
print(u.iphone())
print(u.iphone(app="chrome"))
print(u.iphone(app="safari"))


# generate windows user-agent from chrome,firefox,edge...
print(u.windows())  # random
print(u.windows(app="chrome"))
print(u.windows(app="firefox"))
print(u.windows(app="edge"))

# generate linux user-agent
print(u.linux())
print(u.linux(app="chrome"))
print(u.linux(app="firefox"))


# generate mac user-agent
print(u.mac())
print(u.mac(app="chrome"))
print(u.mac(app="firefox"))
print(u.mac(app="safiri"))

# and if you want, you can just generate random ua
print(u.random())

# or designated platform
print(u.pc())

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

r_useragent-1.1.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

r_useragent-1.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file r_useragent-1.1.tar.gz.

File metadata

  • Download URL: r_useragent-1.1.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for r_useragent-1.1.tar.gz
Algorithm Hash digest
SHA256 62a81149b25e34b75d384cf781c421ac9f47390e5dd300f4818c4168b4a2815f
MD5 cae4622bf5dc0a17cae2f79b0bfe7b73
BLAKE2b-256 f8d887c06deeba27631ec11df7f8c08c67da1946806c098412952477e76ac085

See more details on using hashes here.

File details

Details for the file r_useragent-1.1-py3-none-any.whl.

File metadata

  • Download URL: r_useragent-1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for r_useragent-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24193eaa09a7720e1a229fcd97377419e52fd92f9e3db3e2f2a170d3f7baf16f
MD5 06c51981393cf174425cc542c0b4c206
BLAKE2b-256 e640a91cba904d29926cfebed04320f59a448a7e4f0aea2a69f8e482767cae50

See more details on using hashes here.

Supported by

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