diff --git a/gsuid_core/utils/api/mys/request.py b/gsuid_core/utils/api/mys/request.py index 8bed492..39f426f 100644 --- a/gsuid_core/utils/api/mys/request.py +++ b/gsuid_core/utils/api/mys/request.py @@ -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,