Skip to main content

User-Agent generator

Project description

https://travis-ci.org/lorien/user_agent.png?branch=master https://img.shields.io/pypi/dm/user_agent.svg https://img.shields.io/pypi/v/user_agent.svg https://readthedocs.org/projects/user_agent/badge/?version=latest

What is user_agent module for?

This module is for generating random, valid web navigator’s configs & User-Agent HTTP headers.

Usage Example

>>> from user_agent import generate_user_agent, generate_navigator
>>> generate_user_agent()
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0'
>>> generate_user_agent(platform=('mac', 'linux'))
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:36.0) Gecko/20100101 Firefox/36.0'
>>> generate_navigator(platform='win', navigator='chrome')
{'appversion': '5.0',
 'name': 'chrome',
 'os': 'win',
 'oscpu': 'Windows NT 10.0; WOW64',
 'platform': 'Win32',
 'user_agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2172.16 Safari/537.36',
 'version': '39.0.2172.16'}

Installation

Use pip:

$ pip install -U user_agent

Documentation

Documentation is available at http://user-agent.readthedocs.org

Contribution

Use github to submit bug,fix or wish request: https://github.com/lorien/user_agent/issues

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

user_agent-0.0.8.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file user_agent-0.0.8.tar.gz.

File metadata

  • Download URL: user_agent-0.0.8.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for user_agent-0.0.8.tar.gz
Algorithm Hash digest
SHA256 0c81958e157c8ea2eba0f2802a082f874bea511db14381e2b129b0a4b62fdd8f
MD5 fa4ebceae9968209f15ca919b67a4b6e
BLAKE2b-256 650f01fc6886d17c3552c2236e79495ed17dd6747a68791e3db33ba5f97f56c7

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