diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index b85078c..316c4fd 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -65,9 +65,11 @@ class htmlUtils: url_text = cls.getPathSaveHtml(curl,"read") except: url_text = None - if url_text != None and not update: + if url_text != None and update == False: return html.fromstring(url_text) - while url_text == None or update: + else: + url_text = None + while url_text == None: if count <= 5: try: print(f"请求地址:{curl}")