From fe75feafc280ce629680188e00e65df2a1df173a Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Fri, 31 Mar 2023 22:47:12 +0800 Subject: [PATCH] fix --- utils/HtmlUtils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index 9460df1..fa4c38d 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -68,9 +68,6 @@ class htmlUtils: try: print(f"请求地址:{curl}") res = s.get(curl,stream=True, headers=cls.headers, timeout=10,allow_redirects=True) - if res.status_code != 200: - cls.remove_HtmlCache(curl) - continue if type == "bytes": url_text = res if type == "json": @@ -85,6 +82,7 @@ class htmlUtils: cls.saveHtml(curl,res.text) except: print(f'Retry! 第{count}次') + cls.remove_HtmlCache(curl) time.sleep(1) traceback.print_exc() count += 1