From ea6b8bd8ccd2bad04e1210f01d48a0524d5e4c6e Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Sun, 15 Jan 2023 21:59:35 +0800 Subject: [PATCH] fix --- utils/HtmlUtils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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}")