mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-06-19 05:45:03 +08:00
1111
This commit is contained in:
parent
5215e7902d
commit
24fd6bcfe2
@ -182,6 +182,7 @@ class SklandLogin:
|
|||||||
async def generate_cred_by_code(self):
|
async def generate_cred_by_code(self):
|
||||||
headers = {
|
headers = {
|
||||||
"User-Agent": "Skland/1.28.0 (com.hypergryph.skland; build:102800063; Android 35; ) Okhttp/4.11.0",
|
"User-Agent": "Skland/1.28.0 (com.hypergryph.skland; build:102800063; Android 35; ) Okhttp/4.11.0",
|
||||||
|
"content-type": "application/json;charset=UTF-8",
|
||||||
"platform": "1",
|
"platform": "1",
|
||||||
"vName": "1.28.0",
|
"vName": "1.28.0",
|
||||||
"origin": "https://zonai.skland.com/",
|
"origin": "https://zonai.skland.com/",
|
||||||
@ -190,11 +191,12 @@ class SklandLogin:
|
|||||||
"dId": await get_d_id(),
|
"dId": await get_d_id(),
|
||||||
"timestamp": str(int(datetime.now().timestamp())),
|
"timestamp": str(int(datetime.now().timestamp())),
|
||||||
}
|
}
|
||||||
self.client.headers = headers
|
# self.client.headers = headers
|
||||||
response = self.client.post(
|
async with httpx.AsyncClient(headers=headers, verify=False) as client:
|
||||||
GENERATE_CRED_BY_CODE,
|
response = await client.post(
|
||||||
json={"code": self.code, "kind": 1},
|
GENERATE_CRED_BY_CODE,
|
||||||
)
|
json={"code": self.code, "kind": 1},
|
||||||
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
print(response.json())
|
print(response.json())
|
||||||
result = convert(response.json(), ZonaiSklandWebUserGenerateCredByCodeResponse)
|
result = convert(response.json(), ZonaiSklandWebUserGenerateCredByCodeResponse)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user