Skip to main content

HTTP requests with impersonating web browsers. Impersonate browsers headers, `TLS/JA3` and `HTTP/2` fingerprints.

Project description

pyreqwest_impersonate

HTTP requests with impersonating web browsers.
Impersonate browsers headers, TLS/JA3 and HTTP/2 fingerprints.
Binding to the Rust reqwest_impersonate library.

Installation

pip install -U pyreqwest_impersonate

Usage

I. Client

A blocking client for making HTTP requests with specific configurations.

Attributes:

  • timeout (float, optional): The timeout for the HTTP requests in seconds. Default is 30.
  • proxy (str, optional): The proxy URL to use for the HTTP requests. Default is None.
  • impersonate (str, optional): The identifier for the entity to impersonate. Default is None.
from pyreqwest_impersonate import Client
client = Client(
    timeout=10,
    proxy="socks5://127.0.0.1:9150",
    impersonate="chrome_123",
)

example:

from pyreqwest_impersonate import Client

client = Client(impersonate="chrome_123")
response = client.request("GET", "https://httpbin.org/anything")

print(response.text)
print(response.status_code)
print(response.url)
print(response.headers)
print(response.cookies)

resp = Client(impersonate="chrome_123").request("GET", "https://tls.browserleaks.com/json")
print(resp.text)

resp = Client(impersonate="chrome_123").request("GET", "https://check.ja3.zone/")
print(resp.text)

II. AsyncClient

TODO


Impersonate

Variants of the impersonate parameter:

"chrome_99"
"chrome_100"
"chrome_101"
"chrome_104"
"chrome_105"
"chrome_106"
"chrome_108"
"chrome_107"
"chrome_109"
"chrome_114"
"chrome_116"
"chrome_117"
"chrome_118"
"chrome_119"
"chrome_120"
"chrome_123"
"safari_12"
"safari_15_3" 
"safari_15_5" 
"safari_15_6_1"
"safari_16"
"safari_16_5"
"safari_17_2_1"
"okhttp_3_9"
"okhttp_3_11"
"okhttp_3_13"
"okhttp_3_14"
"okhttp_4_9"
"okhttp_4_10"
"okhttp_5"
"edge_99"
"edge_101"
"edge_120"

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

pyreqwest_impersonate-0.1.0.tar.gz (16.6 kB view hashes)

Uploaded Source

Built Distributions

pyreqwest_impersonate-0.1.0-cp312-none-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

pyreqwest_impersonate-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

pyreqwest_impersonate-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (2.7 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pyreqwest_impersonate-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

pyreqwest_impersonate-0.1.0-cp311-none-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyreqwest_impersonate-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

pyreqwest_impersonate-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (2.7 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pyreqwest_impersonate-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

pyreqwest_impersonate-0.1.0-cp310-none-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyreqwest_impersonate-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyreqwest_impersonate-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

pyreqwest_impersonate-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (2.7 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pyreqwest_impersonate-0.1.0-cp310-cp310-macosx_10_12_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

pyreqwest_impersonate-0.1.0-cp39-none-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyreqwest_impersonate-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

pyreqwest_impersonate-0.1.0-cp38-none-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyreqwest_impersonate-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

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