From b91bb2c0ccce4443c1cfe6b7de5ba33439ca6cf2 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 26 Aug 2021 02:45:06 +0000 Subject: =?UTF-8?q?:rotating=5Flight:=20=E8=87=AA=E5=8A=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/rich/data_source.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ATRI/plugins/rich') diff --git a/ATRI/plugins/rich/data_source.py b/ATRI/plugins/rich/data_source.py index 6a7f494..12b0914 100644 --- a/ATRI/plugins/rich/data_source.py +++ b/ATRI/plugins/rich/data_source.py @@ -28,7 +28,7 @@ class Rich(Service): def _bv_dec(x) -> str: r = 0 for i in range(6): - r += tr[x[s[i]]] * 58**i + r += tr[x[s[i]]] * 58 ** i result = "av" + str((r - add) ^ xor) return result @@ -37,7 +37,7 @@ class Rich(Service): x = (x ^ xor) + add r = list("BV1 4 1 7 ") for i in range(6): - r[s[i]] = table[x // 58**i % 58] + r[s[i]] = table[x // 58 ** i % 58] return "".join(r) @classmethod @@ -79,7 +79,9 @@ class Rich(Service): res_data = await res.json() data = res_data["data"] - result = (f"{data['bvid']} INFO:\n" - f"Title: {data['title']}\n" - f"Link: {data['short_link']}") + result = ( + f"{data['bvid']} INFO:\n" + f"Title: {data['title']}\n" + f"Link: {data['short_link']}" + ) return result, True -- cgit v1.2.3