【发布时间】:2021-04-03 12:44:04
【问题描述】:
我尝试向这个 URL 发送请求:Site URL
并使用以下代码进行简单的页面阅读:
import requests
url_1 = 'http://www.dsit.org.ir/?cmd=page&Cid=92&title=Kontakt&lang=fa'
print(requests.get(url_1).text)
但我得到了这个错误:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.srgfesrsergserg.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000008EC69AAA90>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
此网站非常基础,没有特殊的安全措施。另外,我只请求过一次
一切都很好,我很容易用 Request-html 打开这个页面,但我不知道这里有什么问题!
【问题讨论】:
标签: python web-scraping python-requests request httpurlconnection