mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-06-23 14:16:52 +08:00
✨ 集中判断是否为CookieClientManager
This commit is contained in:
@@ -7,6 +7,7 @@ from ..config.db_model import Target
|
||||
from ..types import Target as T_Target
|
||||
from ..platform import platform_manager
|
||||
from ..plugin_config import plugin_config
|
||||
from ..utils.site import is_cookie_client_manager
|
||||
|
||||
scheduler_dict: dict[type[Site], Scheduler] = {}
|
||||
|
||||
@@ -30,7 +31,7 @@ async def init_scheduler():
|
||||
else:
|
||||
_schedule_class_platform_dict[site].append(platform_name)
|
||||
for site, target_list in _schedule_class_dict.items():
|
||||
if hasattr(site.client_mgr, "_cookie_client_manger_"):
|
||||
if is_cookie_client_manager(site.client_mgr):
|
||||
await site.client_mgr.init_universal_cookie()
|
||||
if not plugin_config.bison_use_browser and site.require_browser:
|
||||
logger.warning(f"{site.name} requires browser, it will not schedule.")
|
||||
|
||||
Reference in New Issue
Block a user