diff --git a/gsuid_core/utils/api/mys/request.py b/gsuid_core/utils/api/mys/request.py index 4952651..b75bb2c 100644 --- a/gsuid_core/utils/api/mys/request.py +++ b/gsuid_core/utils/api/mys/request.py @@ -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)