From 2a053422ee3086da5caba92002f5cea3c1553032 Mon Sep 17 00:00:00 2001 From: felinae98 <731499577@qq.com> Date: Thu, 29 Apr 2021 18:42:37 +0800 Subject: [PATCH] drop supported target --- src/plugins/nonebot_hk_reporter/config.py | 4 +++- src/plugins/nonebot_hk_reporter/utils.py | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/nonebot_hk_reporter/config.py b/src/plugins/nonebot_hk_reporter/config.py index 84ea072..5b7452c 100644 --- a/src/plugins/nonebot_hk_reporter/config.py +++ b/src/plugins/nonebot_hk_reporter/config.py @@ -8,8 +8,10 @@ from tinydb import Query, TinyDB from .plugin_config import plugin_config from .types import User -from .utils import Singleton, supported_target_type +from .utils import Singleton +from .platform import platform_manager +supported_target_type = platform_manager.keys() def get_config_path() -> str: if plugin_config.hk_reporter_config_path: diff --git a/src/plugins/nonebot_hk_reporter/utils.py b/src/plugins/nonebot_hk_reporter/utils.py index 56db32a..efbec3d 100644 --- a/src/plugins/nonebot_hk_reporter/utils.py +++ b/src/plugins/nonebot_hk_reporter/utils.py @@ -20,11 +20,8 @@ class Singleton(type): cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] -# supported_target_type = ('weibo', 'bilibili', 'rss', 'arknights', 'wechat') -supported_target_type = ('weibo', 'bilibili', 'rss', 'arknights', 'monster-siren') - if not plugin_config.hk_reporter_use_local and not check_chromium(): - os.environ['PYPPETEER_DOWNLOAD_HOST'] = 'http://npm.taobao.org/mirrors' + download_chromium() class Render(metaclass=Singleton):