Skip to main content

A simple library to generate fake user agents.

Project description

User Agent Generator

A simple library to generate fake user agents for various platforms and browsers. This library can be useful for web scraping, testing, and simulating user behavior in web applications.

Features

  • Generates random user agents for multiple platforms:
    • Chrome
    • Firefox
    • Safari
    • Microsoft Edge
    • Internet Explorer
    • Android
    • iOS
    • Linux
    • Mac
    • Windows
  • Customizable version and build numbers
  • Easy to use and integrate into your projects

Installation

You can install the package using pip:

pip install useragent-generator

Usage

Here’s how to use the UserAgentGenerator class in your project:

Example

from spoofagent import UserAgentGenerator

# Create an instance of the generator
generator = UserAgentGenerator()

# Generate user agents for different platforms
chrome_ua = generator.generate_user_agent('chrome')
firefox_ua = generator.generate_user_agent('firefox')
safari_ua = generator.generate_user_agent('safari')
edge_ua = generator.generate_user_agent('edge')
ie_ua = generator.generate_user_agent('ie')
android_ua = generator.generate_user_agent('android')
ios_ua = generator.generate_user_agent('ios')
linux_ua = generator.generate_user_agent('linux')
mac_ua = generator.generate_user_agent('mac')
windows_ua = generator.generate_user_agent('windows')

# Print the generated user agents
print("Chrome User Agent:", chrome_ua)
print("Firefox User Agent:", firefox_ua)
print("Safari User Agent:", safari_ua)
print("Edge User Agent:", edge_ua)
print("Internet Explorer User Agent:", ie_ua)
print("Android User Agent:", android_ua)
print("iOS User Agent:", ios_ua)
print("Linux User Agent:", linux_ua)
print("Mac User Agent:", mac_ua)
print("Windows User Agent:", windows_ua)

Customizing User Agents

You can customize the version and build numbers when generating user agents:

custom_ua = generator.generate_user_agent('chrome', version='89', build='1234')
print("Custom Chrome User Agent:", custom_ua)

Platform Options

The following platforms are supported:

  • chrome
  • firefox
  • safari
  • edge
  • ie
  • android
  • ios
  • linux
  • mac
  • windows

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

spoofagent-1.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

spoofagent-1.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file spoofagent-1.0.1.tar.gz.

File metadata

  • Download URL: spoofagent-1.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for spoofagent-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6c8f6390e369b4686bf75babc9f9adbf50c96630a7ad126c5d5b915c968764f0
MD5 856876c2ddf000a8cefaa9208629c9a8
BLAKE2b-256 4ec9dcdc849b609597ff8cca8c34cc0b4b245245c3ec9f626d75dabf9062c140

See more details on using hashes here.

File details

Details for the file spoofagent-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: spoofagent-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for spoofagent-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35a49187a629251b7252c85d091a44fd9bdb7253a12ce8420e8f8b8a40a8997d
MD5 efaf55f5b38e60ca4de61b6fc59eff7a
BLAKE2b-256 91de6270917d4c3cebbad5754b8345ca07eee79da0cb6cc12719690a8bab34ba

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