diff options
Diffstat (limited to 'ATRI')
-rw-r--r-- | ATRI/plugins/applet/__init__.py | 2 | ||||
-rw-r--r-- | ATRI/plugins/applet/data_source.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ATRI/plugins/applet/__init__.py b/ATRI/plugins/applet/__init__.py index 233df3e..8d89514 100644 --- a/ATRI/plugins/applet/__init__.py +++ b/ATRI/plugins/applet/__init__.py @@ -14,7 +14,7 @@ async def _(event: MessageEvent): result, is_ok = await Applet().msg_builder(msg) except Exception: return - + if not is_ok: return diff --git a/ATRI/plugins/applet/data_source.py b/ATRI/plugins/applet/data_source.py index d2b5151..3fc1bc5 100644 --- a/ATRI/plugins/applet/data_source.py +++ b/ATRI/plugins/applet/data_source.py @@ -47,7 +47,7 @@ class Applet(Service): pattern = re.compile(r"BV[0-9A-Za-z]{10}") result = pattern.findall(text) return result[0] if result else "" - + @classmethod async def msg_builder(cls, text: str) -> tuple: bv = cls.bili_video_code_catcher(text) @@ -61,10 +61,10 @@ class Applet(Service): rep = await cls.bili_request(u) bv = cls.bili_video_code_catcher(rep) av = cls._bv_dec(bv) - + else: av = cls._bv_dec(bv) - + url = URL + av req = await request.get(url) res_data = req.json() |