mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
feat(network): migrate async HTTP client to HTTPX2 (#6394)
This commit is contained in:
@@ -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响应
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user