无法分析错误Python请求代理



Python请求不连接到代理socks5。

c.get(URL, headers=HEADERS, proxies=dict(http="socks5://user:" + j, https="socks5://user:" + j))

错误:

requests.exceptions.InvalidURL: Failed to parse: socks5://user:13.125.104.9:1080

我已经安装了请求[socks]。

它应该看起来像:

dict(http='socks5://user:pass@host:port',https='socks5://user:pass@host:port'))

如果你的socks5不使用user和pass,只使用:

dict(http='socks5://host:port',https='socks5://host:port'))

最新更新