🎨 调整逻辑 (#594)

* update salt version

* update signing

* 🚨 `pre-commit-ci`修复格式错误

* update

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
lulu666lulu 2023-10-18 20:15:05 +08:00 committed by GitHub
parent 53ab47e233
commit 998dd1a7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,7 +211,6 @@ class MihoyoBBSCoin:
logger.info('开始执行米游社签到......') logger.info('开始执行米游社签到......')
header = deepcopy(self.headers) header = deepcopy(self.headers)
for i in self.mihoyobbs_List_Use: for i in self.mihoyobbs_List_Use:
header['DS'] = get_ds_token('', {'gids': i['id']}, '22')
data = await self._request( data = await self._request(
'POST', 'POST',
BBS_SIGN_URL, BBS_SIGN_URL,
@ -307,6 +306,8 @@ class MihoyoBBSCoin:
data: Dict = {}, data: Dict = {},
) -> Dict: ) -> Dict:
for _ in range(2): for _ in range(2):
if data != {}:
header['DS'] = get_ds_token('', data, '22')
async with AsyncClient(timeout=None) as client: async with AsyncClient(timeout=None) as client:
req = await client.request( req = await client.request(
method=method, method=method,