Try to fix popup clear error
This commit is contained in:
parent
14d7fcd9e3
commit
8e8179a775
2
main.py
2
main.py
|
@ -147,7 +147,7 @@ if __name__ == '__main__':
|
||||||
print('正在尝试清除15分钟弹窗……')
|
print('正在尝试清除15分钟弹窗……')
|
||||||
for popout in json.loads(res.text)['data']['list']:
|
for popout in json.loads(res.text)['data']['list']:
|
||||||
popid = popout['id']
|
popid = popout['id']
|
||||||
clear_result = r.post('https://api-cloudgame.mihoyo.com/hk4e_cg_cn/gamer/api/ackNotification', headers=headers, data={'id': popid})
|
clear_result = r.post('https://api-cloudgame.mihoyo.com/hk4e_cg_cn/gamer/api/ackNotification', headers=headers, data={'id': str(popid)})
|
||||||
try:
|
try:
|
||||||
if clear_result.status_code == 200 and clear_result.json()['msg'] == 'OK':
|
if clear_result.status_code == 200 and clear_result.json()['msg'] == 'OK':
|
||||||
print(f'已清除id为{popid}的弹窗!')
|
print(f'已清除id为{popid}的弹窗!')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user