Skip to content

Commit 5c8fd57

Browse files
committed
[update] 多次请求失败时,返回百度页面,返回None会有问题
1 parent e3b454e commit 5c8fd57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Util/WebRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@ def get(self, url, header=None, retry_time=5, timeout=30,
8282
print(e)
8383
retry_time -= 1
8484
if retry_time <= 0:
85-
return
85+
# 多次请求失败时,返回百度页面
86+
return requests.get("https://www.baidu.com/")
8687
time.sleep(retry_interval)

0 commit comments

Comments
 (0)