Skip to main content

Super simple user agent generator

Project description

spawn-user-agent

Python 3.9+ License: GPL v3

spawn_user_agent is a library for generating a list of recent user agents (i.e. within the past year). This makes it useful for testing purposes or for web spiders exercising discretion.

So how does this differ from everything else? Well this is a simple & barebones library without any dependencies. Generating user agents shouldn't be a difficult or complex problem, but just about every other library I could find struggles to KISS.

Some reasonable amount of effort will be applied to keep the list of UAs up to date.

Installation

pip install spawn-user-agent

Usage

from spawn_user_agent.user_agent import SpawnUserAgent

# generate a list of firefox UAs
print(SpawnUserAgent.firefox())

# generate a list of chrome UAs
print(SpawnUserAgent.chrome())

# generate a list of safari UAs
print(SpawnUserAgent.safari())

# generate a list of mobile safari UAs
print(SpawnUserAgent.safari_mobile())

# generate a list of all UAs (combination of everything above)
print(SpawnUserAgent.generate_all())

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

spawn-user-agent-0.0.1.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

spawn_user_agent-0.0.1-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

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