mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🚨 pre-commit-ci
修复格式错误
This commit is contained in:
parent
dbcb3651c9
commit
37f4a7d74a
@ -262,10 +262,10 @@ class BaseMysApi:
|
||||
uid = params['role_id']
|
||||
header['x-rpc-device_id'] = await self.get_user_device_id(uid)
|
||||
header['x-rpc-device_fp'] = await self.get_user_fp(uid)
|
||||
|
||||
|
||||
for _ in range(2):
|
||||
print(header)
|
||||
|
||||
|
||||
async with client.request(
|
||||
method,
|
||||
url=url,
|
||||
@ -300,7 +300,9 @@ class BaseMysApi:
|
||||
header['x-rpc-device_fp'] = new_fp
|
||||
return retcode
|
||||
else:
|
||||
header['x-rpc-challenge_game'] = '6' if self.is_sr else '2'
|
||||
header['x-rpc-challenge_game'] = (
|
||||
'6' if self.is_sr else '2'
|
||||
)
|
||||
header['x-rpc-page'] = (
|
||||
'3.1.3_#/rpg' if self.is_sr else '3.1.3_#/ys'
|
||||
)
|
||||
@ -313,10 +315,14 @@ class BaseMysApi:
|
||||
if 'DS' in header:
|
||||
if isinstance(params, Dict):
|
||||
q = '&'.join(
|
||||
[f'{k}={v}' for k, v in sorted(
|
||||
params.items(), key=lambda x: x[0]
|
||||
)]
|
||||
[
|
||||
f'{k}={v}'
|
||||
for k, v in sorted(
|
||||
params.items(),
|
||||
key=lambda x: x[0],
|
||||
)
|
||||
]
|
||||
)
|
||||
else:
|
||||
q = ''
|
||||
header['DS'] = get_ds_token(q, data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user