summaryrefslogtreecommitdiff
path: root/ATRI/plugins/rich/data_source.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2021-05-04 14:27:56 +0800
committerKyomotoi <[email protected]>2021-05-04 14:27:56 +0800
commitea7f48011c34fdaec7e91af7eb373c8174e439e6 (patch)
treee4f14eaacde37774d49e7f98ac1ff4635049d80a /ATRI/plugins/rich/data_source.py
parent07a7e41f72cfa9dfd207a04445f4aa5b0b6fa3ce (diff)
downloadATRI-ea7f48011c34fdaec7e91af7eb373c8174e439e6.tar.gz
ATRI-ea7f48011c34fdaec7e91af7eb373c8174e439e6.tar.bz2
ATRI-ea7f48011c34fdaec7e91af7eb373c8174e439e6.zip
✨🐛 更新
新增:老婆! 新增:涩图 修复:manage中出现的bug 优化:nsfw不再用float,换为int
Diffstat (limited to 'ATRI/plugins/rich/data_source.py')
-rw-r--r--ATRI/plugins/rich/data_source.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ATRI/plugins/rich/data_source.py b/ATRI/plugins/rich/data_source.py
index 59474ff..32ac219 100644
--- a/ATRI/plugins/rich/data_source.py
+++ b/ATRI/plugins/rich/data_source.py
@@ -1,4 +1,4 @@
-table = "fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF"
+table = 'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF'
tr = {}
for i in range(58):
tr[table[i]] = i
@@ -10,13 +10,13 @@ add = 8728348608
def dec(x) -> int:
r = 0
for i in range(6):
- r += tr[x[s[i]]] * 58 ** i
+ r += tr[x[s[i]]] * 58**i
return (r - add) ^ xor
def enc(x) -> str:
x = (x ^ xor) + add
- r = list("BV1 4 1 7 ")
+ r = list('BV1 4 1 7 ')
for i in range(6):
- r[s[i]] = table[x // 58 ** i % 58]
- return "".join(r)
+ r[s[i]] = table[x // 58**i % 58]
+ return ''.join(r)