问题检索={requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘localhost’, port=8050): Max retries exceeded with url: /render.html?url=https://www.baidu.com (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x03907AF0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’))}
原文代码
但是我忘记了,我的splash网址已经变了(splash网址变换可参考如下文章)
https://blog.csdn.net/Omann/article/details/105114739
因此,在代码中更改正确的splash网址代码即可
import requests
url = 'http://192.168.99.100:8050/render.html?url=https://www.baidu.com'
response = requests.get(url)
print(response.text)
再次运行
成功!