mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
更新代码
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from requests import ReadTimeout
|
||||
from requests import exceptions
|
||||
from requests import get
|
||||
|
||||
|
||||
@@ -29,11 +31,11 @@ class Html:
|
||||
timeout=self.timeout,
|
||||
headers=headers or self.headers, )
|
||||
except (
|
||||
requests.exceptions.ProxyError,
|
||||
requests.exceptions.SSLError,
|
||||
requests.exceptions.ChunkedEncodingError,
|
||||
requests.exceptions.ConnectionError,
|
||||
requests.ReadTimeout,
|
||||
exceptions.ProxyError,
|
||||
exceptions.SSLError,
|
||||
exceptions.ChunkedEncodingError,
|
||||
exceptions.ConnectionError,
|
||||
ReadTimeout,
|
||||
):
|
||||
print("获取网页源码失败!")
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user