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 useragent-generator 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spoofagent-1.0.0.tar.gz.
File metadata
- Download URL: spoofagent-1.0.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c7dfc9c6fdddf20c27f2b17f2b11912b9db5708c175097839ccf7c3d7fb64c
|
|
| MD5 |
e771763242f7cf8c1ad9ec1c16564048
|
|
| BLAKE2b-256 |
3df07d7ccb4a189c9ed964a6bb4510c0cc59b8d56ec172b11b139771bcbc9af4
|
File details
Details for the file spoofagent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: spoofagent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c91b36fedf8e5f079a9b63ebd80869302173d4ea2ea3c12e2b2d62e3f3d6ee42
|
|
| MD5 |
27bed2f90685150a7806a97fa392b26b
|
|
| BLAKE2b-256 |
eed4fa977b77d3165e86c3471e38f29aa0d4d2a58f0e366802804c62b73dfad1
|