fix
This commit is contained in:
parent
a350d640ec
commit
9ad8a5f9cd
@ -36,7 +36,7 @@ class htmlUtils:
|
|||||||
else:
|
else:
|
||||||
url_text = html.fromstring(res.text)
|
url_text = html.fromstring(res.text)
|
||||||
except:
|
except:
|
||||||
ntfy.sendMsg(f'Retry! 第{count}次')
|
print(f'Retry! 第{count}次')
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
count += 1
|
count += 1
|
||||||
@ -64,11 +64,12 @@ class htmlUtils:
|
|||||||
data_json = res.json()
|
data_json = res.json()
|
||||||
return data_json
|
return data_json
|
||||||
except:
|
except:
|
||||||
ntfy.sendMsg(f"请求失败,重试中... {curl}")
|
print(f"请求失败,重试中... {curl}")
|
||||||
count += 1
|
count += 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
cls.getJSON(curl)
|
cls.getJSON(curl)
|
||||||
else:
|
else:
|
||||||
|
ntfy.sendMsg(f"重试请求失败... {curl}, 已退出")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user