fix
This commit is contained in:
1 parent
1a17ea9d17
commit
e48528805b
1 file changed
+2
-2
+2
-2
@@ -55,7 +55,7 @@ class htmlUtils:
|
|||||||
try:
|
try:
|
||||||
print(f"请求地址:{curl}")
|
print(f"请求地址:{curl}")
|
||||||
res = s.get(curl,stream=True, headers=cls.headers, timeout=180)
|
res = s.get(curl,stream=True, headers=cls.headers, timeout=180)
|
||||||
time.sleep(3)
|
time.sleep(0.3)
|
||||||
if type == "bytes":
|
if type == "bytes":
|
||||||
url_text = res
|
url_text = res
|
||||||
if type == "json":
|
if type == "json":
|
||||||
@@ -66,7 +66,7 @@ class htmlUtils:
|
|||||||
cls.saveHtml(curl,res.text)
|
cls.saveHtml(curl,res.text)
|
||||||
except:
|
except:
|
||||||
print(f'Retry! 第{count}次')
|
print(f'Retry! 第{count}次')
|
||||||
time.sleep(3)
|
time.sleep(1)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
count += 1
|
count += 1
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in new issue
Block a user