From b95dc2c1258fd6f14e9d9d4b0651da3502585820 Mon Sep 17 00:00:00 2001 From: helloteemo Date: Fri, 12 Jul 2024 09:50:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=8F=E7=BA=A2=E4=B9=A6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=96=B0=E7=89=88=E6=9C=AC=E4=BD=BF=E7=94=A8>3.10?= =?UTF-8?q?=E7=89=B9=E6=80=A7,=20=E9=99=8D=E4=BD=8E=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media_platform/xhs/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media_platform/xhs/client.py b/media_platform/xhs/client.py index e317b45..78aaec1 100644 --- a/media_platform/xhs/client.py +++ b/media_platform/xhs/client.py @@ -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":