!Important Bugfix!
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
# 100% Standalone 的国服 AimeDB 通讯实现
|
||||
|
||||
import hashlib
|
||||
import time
|
||||
import requests
|
||||
import json
|
||||
import re
|
||||
|
||||
# 常量
|
||||
CHIP_ID = "A63E-01E68606624"
|
||||
COMMON_KEY = "XcW5FW4cPArBXEk4vzKz3CIrMuA5EVVW"
|
||||
API_URL = "http://ai.sys-allnet.cn/wc_aime/api/get_data"
|
||||
|
||||
# 计算 SHA256
|
||||
def getSHA256(input_str):
|
||||
"""SHA256计算"""
|
||||
@@ -21,15 +28,11 @@ def calcSEGAAimeDBAuthKey(varString:str, timestamp:str, commonKey:str="XcW5FW4cP
|
||||
|
||||
def apiAimeDB(qrCode):
|
||||
"""AimeDB 扫码 API 实现"""
|
||||
CHIP_ID = "A63E-01E68606624"
|
||||
COMMON_KEY = "XcW5FW4cPArBXEk4vzKz3CIrMuA5EVVW"
|
||||
API_URL = "http://ai.sys-allnet.cn/wc_aime/api/get_data"
|
||||
|
||||
# 生成一个时间戳
|
||||
timestamp = generateSEGATimestamp()
|
||||
|
||||
# 使用时间戳计算 key
|
||||
currentKey = calcSEGAAimeDBAuthKey(qrCode, timestamp, COMMON_KEY)
|
||||
currentKey = calcSEGAAimeDBAuthKey(CHIP_ID, timestamp, COMMON_KEY)
|
||||
|
||||
# 构造请求数据
|
||||
payload = {
|
||||
|
||||
Reference in New Issue
Block a user