Pychrome ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /json/new
Pychrome ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /json/new
我一直在使用 Pychrome 和 Chrome 开发工具协议来检查 chrome 开发工具中的网络请求。它昨天工作成功。我没有做任何更改,今天我开始收到此错误
ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /json/new (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x102b5e0a0>: Failed to establish a new connection: [Errno 61] Connection refused'))
我已经尝试在任何端口上杀死任何东西 运行,检查 8000 是免费的并且一切正常。在此处 https://github.com/fate0/pychrome 使用 pychrome 给出的示例基本脚本,我仍然遇到相同的错误。所以它一定是我的机器上的某些东西导致了问题,但可以弄清楚为什么它在昨天而不是今天找到了。使用脚本在 pychromes git 页面上给出。我在 tab = browser.new_tab()
步失败了
非常感谢所有建议。
我现在意识到我从未启动过其他无头浏览器。对于 pychrome 读取网络选项卡,它从无头浏览器开始,然后在另一个浏览器中转到您想要的站点。一个基本上是在读另一个。所以基本上启动 chrome 浏览器首先作为一种固定的服务器工作。
sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --disable-gpu --remote-debugging-port=8000
至少从 Mac 开始就是这样。我认为 linux.
更容易
我一直在使用 Pychrome 和 Chrome 开发工具协议来检查 chrome 开发工具中的网络请求。它昨天工作成功。我没有做任何更改,今天我开始收到此错误
ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /json/new (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x102b5e0a0>: Failed to establish a new connection: [Errno 61] Connection refused'))
我已经尝试在任何端口上杀死任何东西 运行,检查 8000 是免费的并且一切正常。在此处 https://github.com/fate0/pychrome 使用 pychrome 给出的示例基本脚本,我仍然遇到相同的错误。所以它一定是我的机器上的某些东西导致了问题,但可以弄清楚为什么它在昨天而不是今天找到了。使用脚本在 pychromes git 页面上给出。我在 tab = browser.new_tab()
非常感谢所有建议。
我现在意识到我从未启动过其他无头浏览器。对于 pychrome 读取网络选项卡,它从无头浏览器开始,然后在另一个浏览器中转到您想要的站点。一个基本上是在读另一个。所以基本上启动 chrome 浏览器首先作为一种固定的服务器工作。
sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --disable-gpu --remote-debugging-port=8000
至少从 Mac 开始就是这样。我认为 linux.
更容易