This commit is contained in:
caiwx86 2022-12-17 17:03:49 +08:00
parent a350d640ec
commit 9ad8a5f9cd

View File

@ -36,7 +36,7 @@ class htmlUtils:
else:
url_text = html.fromstring(res.text)
except:
ntfy.sendMsg(f'Retry! 第{count}')
print(f'Retry! 第{count}')
time.sleep(3)
traceback.print_exc()
count += 1
@ -64,11 +64,12 @@ class htmlUtils:
data_json = res.json()
return data_json
except:
ntfy.sendMsg(f"请求失败,重试中... {curl}")
print(f"请求失败,重试中... {curl}")
count += 1
time.sleep(1)
cls.getJSON(curl)
else:
ntfy.sendMsg(f"重试请求失败... {curl}, 已退出")
exit()
@classmethod