Merge pull request #331 from helloteemo/feature/xiaohognshu_get_image
fix: 小红书下载新版本使用>3.10特性, 降低使用版本
This commit is contained in:
commit
e26c2aaf2a
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue