mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-10 18:57:56 +08:00
♻️ 将 refresh_anonymous_cookie 改为内部方法, 同时外部使用 refresh_client 方法进行刷新匿名 cookie
This commit is contained in:
@@ -60,7 +60,7 @@ class CookieClientManager(ClientManager):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def refresh_anonymous_cookie(cls):
|
||||
async def _refresh_anonymous_cookie(cls):
|
||||
"""更新已有的匿名cookie,若不存在则添加"""
|
||||
existing_anonymous_cookies = await config.get_cookie(cls._site_name, is_anonymous=True)
|
||||
if existing_anonymous_cookies:
|
||||
@@ -135,7 +135,7 @@ class CookieClientManager(ClientManager):
|
||||
return http_client()
|
||||
|
||||
async def refresh_client(self):
|
||||
self.refresh_anonymous_cookie()
|
||||
await self._refresh_anonymous_cookie()
|
||||
|
||||
|
||||
def is_cookie_client_manager(manger: type[ClientManager]) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user