feat(network): migrate async HTTP client to HTTPX2 (#6394)

This commit is contained in:
InfinityPacer
2026-08-22 16:48:23 +08:00
committed by GitHub
parent dfc047b880
commit d131f8d571
9 changed files with 198 additions and 65 deletions
+4 -2
View File
@@ -8,7 +8,7 @@ from random import choice
from typing import Optional, Union
from urllib import parse
import httpx
import httpx2
import requests
from bs4 import BeautifulSoup
@@ -223,7 +223,9 @@ class DoubanApi(metaclass=WeakSingleton):
return req_url, params
@staticmethod
def _handle_response(resp: Union[requests.Response, httpx.Response]) -> dict:
def _handle_response(
resp: Union[requests.Response, httpx2.Response]
) -> dict:
"""
处理HTTP响应
"""