fix
This commit is contained in:
parent
058bc23b1a
commit
fe75feafc2
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user