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

Uploaded Source

Built Distribution

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

ua_generator-0.1.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ua-generator-0.1.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.5 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.3.tar.gz
Algorithm Hash digest
SHA256 68da323f4211be5a4e6ee2925158f8ba4c8db865f732be889afdd04baabf9623
MD5 32d748e2d96f5c5678ab95bf31c5b8ff
BLAKE2b-256 cf80c34f6aa34449ca1a6c3c027f01d15c08b1a36522031481093abf03ae31cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ua_generator-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.6 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.27.1 requests-toolbelt/0.9.1 urllib3/1.26.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4121a3eb02d6925a3716722bc25907ef6c53a12394cf76a0d67ed89842f81e85
MD5 5403150c00eb47f3d2de33b98253a1d6
BLAKE2b-256 43580734e425d849e008c5e23a8cfe7db62ccb11ffa65484f1bb893740a9adcc

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