Skip to main content

Hyper-UA ─ ultra-realistic User-Agent & fingerprint generator.

Project description

HyperUserAgent

Hyper-UA ─ ultra-realistic User-Agent & fingerprint generator.

HyperUserAgent is a Python library that generates realistic, statistically-weighted User-Agent strings and browser fingerprints. It's designed to help developers create bots and web scrapers that are less likely to be detected by anti-bot systems.

Installation

You can install HyperUserAgent using pip:

pip install HyperUserAgent

Usage

Here’s how you can use HyperUserAgent to generate user agents and fingerprints.

Generating a User Agent

You can generate a user agent for various platforms and browsers.

Basic Usage

To generate a random, realistic user agent, you can do the following:

from HyperUserAgent import HyperUA

# Generate a random user agent
ua = HyperUA.create()
print(ua)

# Or, more simply:
ua = HyperUA.random
print(ua)

Generate a Mobile User Agent

from HyperUserAgent import HyperUA

# Generate a mobile user agent
mobile_ua = HyperUA.create(platform="mobile")
print(mobile_ua)

Generate for a Specific Browser

You can also generate user agents for specific browsers. The easiest way is to use the class properties:

from HyperUserAgent import HyperUA

# Generate a Chrome user agent
chrome_ua = HyperUA.chrome
print(chrome_ua)

# Generate a Firefox user agent
firefox_ua = HyperUA.firefox
print(firefox_ua)

For more control, you can use the static methods:

from HyperUserAgent import HyperUA

# Generate a Firefox user agent for a mobile platform
firefox_mobile_ua = HyperUA.getFirefox(platform="mobile")
print(firefox_mobile_ua)

Generating a Browser Fingerprint

HyperUserAgent can also generate a detailed browser fingerprint to accompany a user agent.

from HyperUserAgent import HyperUA, Fingerprint

# First, create a user agent
ua = HyperUA.create()

# Generate a fingerprint for the user agent
fp = Fingerprint.generate(ua)

# Print the fingerprint as a dictionary
print(fp.to_dict())

Features

  • Realistic User-Agent Generation: Generates user agents that are indistinguishable from real browsers.
  • Browser Fingerprinting: Creates detailed browser fingerprints, including Canvas, WebGL, and more.
  • Statistically-Weighted Selection: User agents are generated based on real-world usage statistics.
  • Customizable Generation: Easily generate user agents for specific browsers, platforms, and versions.
  • Wide Range of Supported Browsers: Supports Chrome, Firefox, Safari, Edge, Opera, Brave, and Yandex.
  • Cross-Platform: Generates user agents for desktop (Windows, macOS, Linux) and mobile (Android, iOS).

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

hyperuseragent-1.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

hyperuseragent-1.1.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file hyperuseragent-1.1.1.tar.gz.

File metadata

  • Download URL: hyperuseragent-1.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for hyperuseragent-1.1.1.tar.gz
Algorithm Hash digest
SHA256 974ae9ac1900388fb4daf00e81c30c13ee91375b4470f458d2407092b7c96ecc
MD5 0c0f458b93c0aa1f22cf411de082a805
BLAKE2b-256 234a28a463975a83e1a9e98664ed44bde2f19c0dc6c8f4882db5bc1dff222a40

See more details on using hashes here.

File details

Details for the file hyperuseragent-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: hyperuseragent-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for hyperuseragent-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db0b0fcab468e4648c0f9608c96ce185342c609c51ff7ffdda23f2e617415d3b
MD5 350c0de7f47ac653ab59e8fac0de90b9
BLAKE2b-256 7114a414d36c8c27f3287a0af90acdbc087ef5a9a809d8b750d76922a076c6a9

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