Skip to main content

a python http client implemented based on the winhttp library

Project description

pywinhttp

version license python_version coverage

a python http client implemented based on the winhttp library.

Using it to create web crawlers can avoid Cloudflare's TLS fingerprinting.

because the winhttp library is the underlying implementation of the Edge browser.

its TLS fingerprint is consistent with the Edge browser.

it can only run on the Windows platform.

this project uses python's built-in ctypes to call winhttp.dll directly, with no dependencies on third-party packages.

Install

$ pip install pywinhttp

Using

import pywinhttp

user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0"
client = pywinhttp.Session(user_agent)

url = "https://public-wax-on.wax.io/wam/sign"

resp = client.get(url)
print(resp.text)

post_data = {
    "serializedTransaction": "xxxxxxxxxxxxxxxxxxxxxxx",
    "description": "jwt is insecure",
    "freeBandwidth": False,
    "website": "play.alienworlds.io",
}
headers = {"x-access-token": "xxxxxxxxxxxxxxxxxxxxxxx"}
resp = client.post(url, json = post_data, headers = headers)
print(resp.text)

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

pywinhttp-1.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

pywinhttp-1.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywinhttp-1.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pywinhttp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f6cd5d70202ba47d04e71081167ec3481f30690240d3d005cbad051ef104d873
MD5 21ff18b432a2610f99f1fb45a9fabacd
BLAKE2b-256 8468fb0f016512aa3e18994b23145792bd90c6755901d62c5db5de637da14810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywinhttp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pywinhttp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53c61a650afa1f6e7755dbd6bd0ad915322ae55a7240e89f26f45b2cdd2a7d2c
MD5 4c0abfb187e06d97a501870b4ba42932
BLAKE2b-256 46686c8a335717cbfb9a952b8ff6dd18fa0d08a2b85ce0c25779e16140f95759

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