我正在尝试使用代理。Py一个python库,该库在我的Localhost:8899上运行。我试图通过使用NGrok HTTP 8899来使端口实时。现在,我正在尝试访问由Ngrok生成的代理URL作为请求中的proix。但是无法获得回应。 run代理命令的步骤
- 以下是我遵循pip install proxy.py
- 。代理在端口8899上运行。
- 使用nGrok并生成以下链接
import requests
resp = requests.get("http://httpbin.org/ip",proxies={'http':'http://0ebe-117-220-248-73.ngrok.io'}).text
print(resp)
试图将其用作LIB请求中的代理。
但是无法击中代理
- 以下工作正常,
import requests
resp = requests.get("http://httpbin.org/ip",proxies={'http':'http://localhost:8899'}).text
print(resp)
有任何方法可以将端口8899公开,以便我可以从另一个系统中使用代理
I am trying to use proxy.py a python library which runs on my localhost:8899. The I tried to make the port live by using ngrok http 8899. Now I am trying to access the proxy url which is generated by ngrok as proixes in request. But am unable to fetch the response. The following are the step I followed
- pip install proxy.py
- run proxy command in terminal. The proxy is running on port 8899.
- used ngrok and generated the following link http://0ebe-117-220-248-73.ngrok.io
import requests
resp = requests.get("http://httpbin.org/ip",proxies={'http':'http://0ebe-117-220-248-73.ngrok.io'}).text
print(resp)
Tried to use it as proxy in requests lib.
But unable to hit the proxy
- The following works fine
import requests
resp = requests.get("http://httpbin.org/ip",proxies={'http':'http://localhost:8899'}).text
print(resp)
Is there any way to make port 8899 public so that I can use the proxy from another system
发布评论