在大量访问网页时,有可能出现这种报错:
14-09-2019 12:1138 root: ERROR: HTTPSConnectionPool(host='www.mzitu.com', port=443...self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 67, in create_connection...", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags...argument 'buffering'
During handling of the above exception, another exception occurred:
原因
但实际上都是同一种错误...:
During handling of the above exception, another exception occurred:
而这都是由于频繁访问网站造成的
解决
在访问失败后,添加 time.sleep