Skip to main content

Thư Viện Hỗ Trợ Tạo UserAgent, Console v.v

Project description

UserAgent Generator

This project aims to create a simple user-agent generator that can be used to mimic different browsers and devices. This can be particularly useful for web scraping and testing purposes.

Getting Started v1.6

Prerequisites

Ensure you have the following installed:

  • Python 3.x
  • pip

Installation

Follow these steps to set up the project:

$ pip install GenUserAgent

Generate User-Agent Facebook

from Gen import UserAgentGenerator

headers = {
'User-agent': UserAgentGenerator().generate_user_agent(),
'X-Tigon-Is-Retry': 'False',
'X-Fb-Device-Group': '7948',
'X-Graphql-Request-Purpose': 'fetch',
'X-Fb-Privacy-Context': '3643298472347298',
'X-Fb-Friendly-Name': 'FbBloksActionRootQuery-com.bloks.www.bloks.caa.login.async.send_login_request',
}

Logger console

from Gen import UserAgentGenerator 
from Gen.utils import logger


user_agent = UserAgentGenerator().generate_user_agent()

from Gen.utils import logger
import requests

result =  requests.get("https://api.myip.com")
if result.status_code == 200:
    logger.info(f"SUCCESS - IP : {result.json()['ip']}")
else:
    logger.warning("Not found result !")

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

GenUserAgent-1.7.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file GenUserAgent-1.7.tar.gz.

File metadata

  • Download URL: GenUserAgent-1.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for GenUserAgent-1.7.tar.gz
Algorithm Hash digest
SHA256 a7506b13c39445ea58399904daacfb22f2be19cca433f721efa9df648dc29215
MD5 10e44c676dad6ef72a8e8f5795cdd6ea
BLAKE2b-256 5c62a73cbaa2ea09f49df6f1cdccd725622b9abebfc73a237c8b3b722d230144

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