From 9d985eb3c8c2a9c1d755c5ed36bf813a7c8fc925 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Tue, 29 Oct 2024 12:23:50 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20bilibili=20=E7=A7=BB=E9=99=A4=20=5F?= =?UTF-8?q?client=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_bison/platform/bilibili/scheduler.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/nonebot_bison/platform/bilibili/scheduler.py b/nonebot_bison/platform/bilibili/scheduler.py index b117dcd..5d19b75 100644 --- a/nonebot_bison/platform/bilibili/scheduler.py +++ b/nonebot_bison/platform/bilibili/scheduler.py @@ -23,14 +23,9 @@ B = TypeVar("B", bound="Bilibili") class BilibiliClientManager(CookieClientManager): - _client: AsyncClient _inited: bool = False - _site_name: str = "bilibili.com" - def __init__(self) -> None: - self._client = http_client() - @classmethod async def _get_cookies(self) -> list[Cookie]: browser = await get_browser() @@ -43,15 +38,6 @@ class BilibiliClientManager(CookieClientManager): return cookies - async def _reset_client_cookies(self, cookies: list[Cookie]): - for cookie in cookies: - self._client.cookies.set( - name=cookie.get("name", ""), - value=cookie.get("value", ""), - domain=cookie.get("domain", ""), - path=cookie.get("path", "/"), - ) - @classmethod def _gen_json_cookie(self, cookies: list[Cookie]): cookie_dict = {}