mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🎨 适配星穹铁道特殊情况 (#14)
* 适配星穹铁道过码
* 🚨 `pre-commit-ci`修复格式错误
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
cfc0944c52
commit
ed846b5851
@ -202,12 +202,20 @@ class BaseMysApi:
|
||||
raw_data = {}
|
||||
for _ in range(2):
|
||||
if 'Cookie' in header and header['Cookie'] in self.chs:
|
||||
# header['x-rpc-challenge']=self.chs.pop(header['Cookie'])
|
||||
if self.is_sr:
|
||||
header['x-rpc-challenge'] = self.chs.pop(
|
||||
header['Cookie']
|
||||
)
|
||||
if isinstance(params, Dict):
|
||||
header['DS'] = get_ds_token(
|
||||
'&'.join(
|
||||
[f'{k}={v}' for k, v in params.items()]
|
||||
)
|
||||
)
|
||||
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'
|
||||
)
|
||||
|
||||
async with client.request(
|
||||
method,
|
||||
url=url,
|
||||
|
Loading…
x
Reference in New Issue
Block a user