requests.exceptions.ConnectionError: HTTPSConnectionPool(Caused by NewConnectionError)解决方法

 File "C:\Users\lhj\AppData\Roaming\Python\Python27\site-packages\requests\sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\lhj\AppData\Roaming\Python\Python27\site-packages\requests\sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\lhj\AppData\Roaming\Python\Python27\site-packages\requests\sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\lhj\AppData\Roaming\Python\Python27\site-packages\requests\adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='jwxk.ucas.ac.cn', port=443): Max retries exceeded with url: /evaluate/teacher/59586 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 10061] ',))

网上搜索后的方法见该链接:
https://blog.csdn.net/a1007720052/article/details/83383220
但是尝试完所有办法后,仍未解决我的问题
后来我发现是因为代码中地址为https,加密地址,可能不太容易进行数据的捕获。我将https改成了http后,代码就调通了!

结果为:
在这里插入图片描述

你可能感兴趣的:(常见问题,python)