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
+6 -28

No files matched your search

+4 -2
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,7 +24,8 @@ def qr_api(qr_code: str):
"Host": "ai.sys-all.cn",
"User-Agent": "WC_AIME_LIB"
}
res = httpx.post(
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
+2 -26
View File
@@ -1,4 +1,3 @@
import json
import asyncio
import httpx
import time
@@ -38,32 +37,9 @@ async def run_workflow(self):
loginId = LoginResponse['loginId']
loginDate = LoginResponse['lastLoginDate']
# UserData 等
# User Charge
tasks = [
self.call_api(client, "GetUserDataApi", requestData_UserData, userId),
self.call_api(client, "GetUserExtendApi", requestData_UserData, userId),
self.call_api(client, "GetUserOptionApi", requestData_UserData, userId),
self.call_api(client, "GetUserRatingApi", requestData_UserData, userId),
self.call_api(client, "GetUserChargeApi", requestData_UserData, userId),
self.call_api(client, "GetUserActivityApi", requestData_UserData, userId),
self.call_api(client, "GetUserMissionDataApi", requestData_UserData, userId),
]
GeneralUserInfo = await asyncio.gather(*tasks)
time.sleep(60) # 模拟游戏时间
# UserPlaylog
requestData_UserPlaylog = UserPlaylog_payload(loginId, musicData, GeneralUserInfo[0])
await self.call_api(client, "UploadUserPlaylogListApi", requestData_UserPlaylog, userId)
# Userall
requestData_Userall = UserAll_payload(loginId, loginDate, musicData, GeneralUserInfo)
await self.call_api(client, "UpsertUserAllApi", requestData_Userall, userId)
await self.call_api(client, "UpsertUserChargelogApi", requestData_UserChargelog, userId)
# UserLogout