diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index af94dfa..31bdff2 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -42,6 +42,7 @@ class htmlUtils: continue else: ntfy.sendMsg(f"fail 请求失败:{curl}") + exit() break if type == "None": data = { curl : url_text} @@ -55,7 +56,7 @@ class htmlUtils: @classmethod def getJSON(cls,curl): count = 0 - while count < 5: + if count < 5: try: res = requests.get(curl, headers=cls.headers, timeout=180) data_json = res.json() @@ -65,7 +66,9 @@ class htmlUtils: count += 1 time.sleep(1) cls.getJSON(curl) - + else: + exit() + @classmethod def xpathData(cls,c_xpath,url=None,num=None,not_eq=None): if url == None: