Skip to main content

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


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.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

ua_generator-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file ua-generator-0.1.0.tar.gz.

File metadata

  • Download URL: ua-generator-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 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

Hashes for ua-generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb90aa93836d2ed94ca1ed8998aafed9ad100a0f7d0e398babaf168bc9383dc2
MD5 6b510aad36545924c64422449ed39344
BLAKE2b-256 a8ca29bfc8ff6dfa0602b7aa10fcd4725284399fcb887f28ca0808c1bda42e64

See more details on using hashes here.

File details

Details for the file ua_generator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ua_generator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 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

Hashes for ua_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 116f36dfac0d47afb1dc3599fb7dc563063a2168b5e79850129d4cefa98818d2
MD5 ba0b41de909bf1934329479c6065f32d
BLAKE2b-256 7375d3e9a47edec4811ceb26c16bebc65e29b6093e03e1384d833d62f0893081

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