你好,
我试图使用python“请求”库访问web数据。下面是使用错误消息执行的代码的详细信息。感谢在解决这一问题上的任何帮助。
python版本: 3.5.2 \x{e76f}Anaconda 4.2.0 ( 32位)x(默认,2016年7月5日,11:45:57) MSC v.1900 32位(Intel)
逻辑:
import requests
response = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html")
response.text
溯源
---------------------------------------------------------------------------
TimeoutError Traceback (most recent call last)
ConnectionError: HTTPConnectionPool(host='dataquestio.github.io', port=80): Max retries exceeded with url: /web-scraping-pages/simple.html (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x03E676B0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
谢谢,戈帕尔.
发布于 2020-08-11 03:06:40
我运行了您前面给出的代码,得到了以下内容
https://stackoverflow.com/questions/49286261
复制相似问题