From 8953d5bd34e2c3724510a414673bf07686ccd6d2 Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Thu, 26 Aug 2021 10:03:33 +0800 Subject: =?UTF-8?q?=F0=9F=8D=BB=F0=9F=9A=91=EF=B8=8F=20=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/rich/data_source.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ATRI') diff --git a/ATRI/plugins/rich/data_source.py b/ATRI/plugins/rich/data_source.py index 1ddaaa2..6a7f494 100644 --- a/ATRI/plugins/rich/data_source.py +++ b/ATRI/plugins/rich/data_source.py @@ -42,10 +42,6 @@ class Rich(Service): @classmethod async def fk_bili(cls, text: str) -> tuple: - """ - 为何本函数这么多 try,因为此函数被用于监听所有信息 - 如果真出现错误,就会一直刷屏 - """ msg = text.replace("\\", "") bv = False if "https://b23" in msg: @@ -70,7 +66,7 @@ class Rich(Service): else: pattern = r"BV[a-zA-Z0-9]+" try: - be = re.findall(pattern, msg)[0] + bv = re.findall(pattern, msg)[0] except: return "Deal bv code failed!", False av = cls._bv_dec(bv).replace("av", "") -- cgit v1.2.3