mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
♻️ bilibili 移除 _client 属性
This commit is contained in:
parent
4805d0d77c
commit
9d985eb3c8
@ -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 = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user