fix: 小红书下载新版本使用>3.10特性, 降低使用版本

This commit is contained in:
helloteemo 2024-07-12 09:50:03 +08:00
parent 6545a15ff3
commit b95dc2c125
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class XiaoHongShuClient(AbstractApiClient):
return await self.request(method="POST", url=f"{self._host}{uri}",
data=json_str, headers=headers)
async def get_note_media(self, url: str) -> bytes | None:
async def get_note_media(self, url: str) -> Union[bytes, None]:
async with httpx.AsyncClient(proxies=self.proxies) as client:
response = await client.request("GET", url, timeout=self.timeout)
if not response.reason_phrase == "OK":