Archive branch

This commit is contained in:
91c0e59d-6161-45ab-8aa4-2371574db28f committed 2026-11-22 00:29:16 +08:00
1 parent 8da425391a
commit a473cf992b
2 files changed
+10 -32

No files matched your search

+8 -6
View File
@@ -2,10 +2,11 @@ import hashlib
import httpx
import pytz
import json
import asyncio
from datetime import datetime
from settings import KeychipID
def qr_api(qr_code: str):
async def QRApi(qr_code: str):
if len(qr_code) > 64:
qr_code = qr_code[-64:]
time_stamp = datetime.now(pytz.timezone('Asia/Tokyo')).strftime("%y%m%d%H%M%S")
@@ -23,10 +24,11 @@ def qr_api(qr_code: str):
"Host": "ai.sys-all.cn",
"User-Agent": "WC_AIME_LIB"
}
res = httpx.post(
"http://ai.sys-allnet.cn/wc_aime/api/get_data",
data = json.dumps(param, separators=(',', ':')),
headers = headers
)
async with httpx.AsyncClient() as client:
res = await client.post(
"http://ai.sys-allnet.cn/wc_aime/api/get_data",
data = json.dumps(param, separators=(',', ':')),
headers = headers
)
assert res.status_code == 200, "网络错误"
return json.loads(res.content)