Skip to main content

janus-requests

requests 兼容的 HTTP 客户端,TLS ClientHello 和 HTTP/2 帧逐字节可控:扩展顺序、GREASE、ALPS、密码套件、SETTINGS、WINDOW_UPDATE、伪头顺序、HPACK 编码都由 profile 决定。核心是 Rust,TLS 用打过补丁的 OpenSSL 4.0.3(静态链接在 wheel 里)。

uv add janus-requests

用法

from janus_requests import JanusSession

with JanusSession(janus="chrome155", headers={"User-Agent": "..."}, proxy="http://127.0.0.1:7890", retry_num=2) as s:
    r = s.get("https://example.com/")
    print(r.status_code, r.raw.version_string)
  • 不带任何默认请求头,发出去的头只有你给的(外加 Host / Content-Length / Cookie)
  • verify 默认关,不读环境变量和系统代理
  • janus= 接受内置名 chrome155 或 JanusProfile
  • logs=func(req, resp) 每个响应回调一次,retry_num= 只重试连接类错误
  • 请求级 headers= 覆盖 session 的同名头,值为 None 表示这次不发
  • JanusAsyncSession 是 asyncio 版本;import janus_requests as requests 可当 requests 用

从真浏览器抓 profile

uv add "janus-requests[capture]"
uv run janus-capture --name my_chrome
# 浏览器打开 https://localhost:8443/

打开页面当场写出 my_chrome.py 和 my_chrome.json,import my_chrome; my_chrome.session() 即可复现这个浏览器。页面脚本随后再开几轮新连接(--rounds,默认 4),补上扩展乱序和会话恢复(PSK)。抓取时关掉系统代理,否则抓到的是代理的指纹。

许可证

MIT。wheel 里静态链接的 OpenSSL(含 Janus 的 ClientHello 补丁)按 Apache-2.0 发布,zlib、brotli、zstd 和 Rust 依赖的许可证见 wheel 的 .dist-info/licenses/。

Metadata

Release files for janus-requests 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for janus-requests 0.2.2
File Interpreter ABI Platform
janus_requests-0.2.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
janus_requests-0.2.2-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details

Total release size: 9.7 MB

Release files / janus_requests-0.2.2-cp310-abi3-win_amd64.whl

Download URL janus_requests-0.2.2-cp310-abi3-win_amd64.whl
Size 4.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4e79e6272c3e2cacc761d67d63e950d9b001140a9323159e3bf07ae5915f48c7
BLAKE2b-256 checksum
How to use checksums
a028b05e4bda386357bbff55b28d70306581db6a3b2e2f6b3b0daae44a590bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / janus_requests-0.2.2-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL janus_requests-0.2.2-cp310-abi3-manylinux_2_28_x86_64.whl
Size 5.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
57c5f0a5125e35af1633017783cf8a4480258fff7a1652d3a2036b5c4dcd1775
BLAKE2b-256 checksum
How to use checksums
2279f3d4aeb11082f8fcbb0528780d7142dd67f402d388dd1f5bb75512e35360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for janus-requests 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page