From 01435eeded42ca86eb2c47f96def5be398fa19d2 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Wed, 4 Sep 2024 01:19:53 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=8F=90=E5=87=BAassemble=5Fclien?= =?UTF-8?q?t=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_bison/utils/site.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nonebot_bison/utils/site.py b/nonebot_bison/utils/site.py index 8550b26..913b815 100644 --- a/nonebot_bison/utils/site.py +++ b/nonebot_bison/utils/site.py @@ -85,6 +85,9 @@ class CookieClientManager(ClientManager): else: logger.debug(f"平台 {self._platform_name} 未获取到用户cookie, 使用空cookie") + return await self.assemble_client(client, cookie) + + async def assemble_client(self, client, cookie): cookies = httpx.Cookies() if cookie: cookies.update(json.loads(cookie.content)) @@ -104,7 +107,7 @@ class CookieClientManager(ClientManager): def create_cookie_client_manager(platform_name: str) -> type[CookieClientManager]: - """创建一个预定义为平台特化的 CookieClientManger""" + """创建一个平台特化的 CookieClientManger""" return type( "CookieClientManager", (CookieClientManager,),