This commit is contained in:
caiwx86 2023-01-09 22:11:52 +08:00
parent edc16f683c
commit b42a4acd12

View File

@ -64,10 +64,10 @@ class htmlUtils:
if url_text != None: if url_text != None:
return html.fromstring(url_text) return html.fromstring(url_text)
while url_text == None: while url_text == None:
if count <= 3: if count <= 5:
try: try:
print(f"请求地址:{curl}") 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: if res.status_code != 200:
cls.remove_HtmlCache(curl) cls.remove_HtmlCache(curl)
return None return None