|
发表于 2021-7-18 13:19:00
|
显示全部楼层
不过,为什么会有
- Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
- Traceback (most recent call last):
- File "D:\Python38\lib\urllib\request.py", line 1350, in do_open
- h.request(req.get_method(), req.selector, req.data, headers,
- File "D:\Python38\lib\http\client.py", line 1240, in request
- self._send_request(method, url, body, headers, encode_chunked)
- File "D:\Python38\lib\http\client.py", line 1286, in _send_request
- self.endheaders(body, encode_chunked=encode_chunked)
- File "D:\Python38\lib\http\client.py", line 1235, in endheaders
- self._send_output(message_body, encode_chunked=encode_chunked)
- File "D:\Python38\lib\http\client.py", line 1006, in _send_output
- self.send(msg)
- File "D:\Python38\lib\http\client.py", line 946, in send
- self.connect()
- File "D:\Python38\lib\http\client.py", line 1402, in connect
- super().connect()
- File "D:\Python38\lib\http\client.py", line 917, in connect
- self.sock = self._create_connection(
- File "D:\Python38\lib\socket.py", line 808, in create_connection
- raise err
- File "D:\Python38\lib\socket.py", line 796, in create_connection
- sock.connect(sa)
- socket.timeout: timed out
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Python38\lib\site-packages\fake_useragent\utils.py", line 64, in get
- with contextlib.closing(urlopen(
- File "D:\Python38\lib\urllib\request.py", line 222, in urlopen
- return opener.open(url, data, timeout)
- File "D:\Python38\lib\urllib\request.py", line 525, in open
- response = self._open(req, data)
- File "D:\Python38\lib\urllib\request.py", line 542, in _open
- result = self._call_chain(self.handle_open, protocol, protocol +
- File "D:\Python38\lib\urllib\request.py", line 502, in _call_chain
- result = func(*args)
- File "D:\Python38\lib\urllib\request.py", line 1393, in https_open
- return self.do_open(http.client.HTTPSConnection, req,
- File "D:\Python38\lib\urllib\request.py", line 1353, in do_open
- raise URLError(err)
- urllib.error.URLError: <urlopen error timed out>
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Python38\lib\site-packages\fake_useragent\utils.py", line 154, in load
- for item in get_browsers(verify_ssl=verify_ssl):
- File "D:\Python38\lib\site-packages\fake_useragent\utils.py", line 97, in get_browsers
- html = get(settings.BROWSERS_STATS_PAGE, verify_ssl=verify_ssl)
- File "D:\Python38\lib\site-packages\fake_useragent\utils.py", line 84, in get
- raise FakeUserAgentError('Maximum amount of retries reached')
- fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached
复制代码 |
|