From b42a4acd121ea8a50f5d1e2bca7cfe2210c94da3 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 9 Jan 2023 22:11:52 +0800 Subject: [PATCH] fix --- utils/HtmlUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index 98c0454..7ed6592 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -64,10 +64,10 @@ class htmlUtils: if url_text != None: return html.fromstring(url_text) while url_text == None: - if count <= 3: + if count <= 5: try: print(f"请求地址:{curl}") - res = s.get(curl,stream=True, headers=cls.headers, timeout=30,allow_redirects=True) + res = s.get(curl,stream=True, headers=cls.headers, timeout=180,allow_redirects=True) if res.status_code != 200: cls.remove_HtmlCache(curl) return None