diff --git a/README.md b/README.md index b369b77..f1d0ffc 100644 --- a/README.md +++ b/README.md @@ -22,17 +22,17 @@ you want; importing the package never fails because an extra is missing. `requirements.txt` (pick the extra you need): ``` -aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1 -aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1 -aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1 +aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2 +aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2 +aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2 ``` Direct: ```bash -pip install "aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1" -pip install "aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1" -pip install "aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.1" +pip install "aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2" +pip install "aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2" +pip install "aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.2" ``` - `[curl]` → curl_cffi backend · `[noble]` → noble_tls backend · `[all]` → both. @@ -55,8 +55,11 @@ async with TLSSession(backend=CurlCffi(impersonate="chrome"), proxies={"https": print(resp.json()["tls"]["ja3"]) ``` -- `CurlCffi(impersonate="chrome")` sets the forged profile; override per call by - passing `impersonate=` to any request method. +- `CurlCffi(impersonate="chrome")` sets the forged profile; override it per call by + passing `impersonate=` to the low-level `request()` (which forwards `**kwargs` to the + backend). `request_with_retries` has a fixed signature and does **not** accept extra + backend kwargs — passing `impersonate=` there raises `TypeError`; set the profile on + the `CurlCffi` instance for the retrying path. - curl_cffi forges JA3/JA4 + HTTP/2 fingerprints via the bundled curl-impersonate binary. ## noble backend diff --git a/pyproject.toml b/pyproject.toml index 8f392b2..2a16762 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "aioweb_tls" -version = "0.1.1" +version = "0.1.2" description = "TLS-fingerprinting backends for aioweb — curl_cffi / noble_tls ExtendedSession subclasses, config-free, installable." requires-python = ">=3.10" dependencies = [ diff --git a/src/aioweb_tls/backends.py b/src/aioweb_tls/backends.py index f5b6e51..68c17f9 100644 --- a/src/aioweb_tls/backends.py +++ b/src/aioweb_tls/backends.py @@ -62,7 +62,10 @@ class CurlCffi: config: impersonate: browser profile to forge (default "chrome"); override per call - by passing impersonate= to any request method. + by passing impersonate= to the low-level request()/_raw_request path, + which forwards **kwargs to the backend. NOT request_with_retries — its + signature is fixed (no **kwargs) and would raise TypeError. for a + per-call profile under retries, set it on the CurlCffi instance instead. requires the [curl] extra (pip install "aioweb_tls[curl]"). """