diff options
author | Lint Action <[email protected]> | 2021-08-26 02:45:06 +0000 |
---|---|---|
committer | Lint Action <[email protected]> | 2021-08-26 02:45:06 +0000 |
commit | b91bb2c0ccce4443c1cfe6b7de5ba33439ca6cf2 (patch) | |
tree | acda55ba0f417b0d992998cd254464cfb00777f7 /ATRI/plugins/rich/data_source.py | |
parent | b4667a5c838adb7a4d0a53eeee992e4784231895 (diff) | |
download | ATRI-b91bb2c0ccce4443c1cfe6b7de5ba33439ca6cf2.tar.gz ATRI-b91bb2c0ccce4443c1cfe6b7de5ba33439ca6cf2.tar.bz2 ATRI-b91bb2c0ccce4443c1cfe6b7de5ba33439ca6cf2.zip |
:rotating_light: 自动进行代码格式化
Diffstat (limited to 'ATRI/plugins/rich/data_source.py')
-rw-r--r-- | ATRI/plugins/rich/data_source.py | 12 |
1 files changed, 7 insertions, 5 deletions
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 |