feat(http): use httpx with pooled connections and browser headers

Add httpx and route Bilibili and Telegram requests through pooled clients with keepalive and explicit timeouts. Align Bilibili headers with data/raw-request.txt: Chrome 155 UA, sec-ch-ua, space.bilibili.com origin, folder-specific referer, and priority header. Close replaced clients when credentials change. Add transport contract tests and live read-only validation for nav, folder sync, WBI search, and Telegram getUpdates.
This commit is contained in:
kairee committed 2026-10-31 22:28:32 +08:00
1 parent 71a0e8c1d6
commit 5b22ed1c5d
12 files changed
+430 -25

No files matched your search

+3 -1
View File
@@ -10,7 +10,9 @@ readme = "README.md"
requires-python = ">=3.14,<3.15"
license = { text = "MIT" }
authors = [{ name = "bili-fav contributors" }]
dependencies = []
dependencies = [
"httpx>=0.28.1",
]
[project.scripts]
bili-fav = "favsort:main"