This commit is contained in:
parent
1f22b1e446
commit
13ec8a7b8c
4
main.py
4
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': str(popid)})
|
clear_result = r.post('https://api-cloudgame.mihoyo.com/hk4e_cg_cn/gamer/api/ackNotification', headers=headers, json={'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}的弹窗!')
|
||||||
|
@ -164,4 +164,4 @@ if __name__ == '__main__':
|
||||||
print('sct推送完成!')
|
print('sct推送完成!')
|
||||||
else:
|
else:
|
||||||
print('sct无法推送')
|
print('sct无法推送')
|
||||||
print(res.text)
|
print(res.text)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user