【发布时间】:2019-11-23 14:54:04
【问题描述】:
在我的脚本中,我试图向 q 代理服务器发出请求。 我只是这样做:
import requests
response = requests.get('https://websiteiwhantget', proxies={"http": '176.36.111.9:56323', "https": '176.36.111.9:56323'})
我从https://free-proxy-list.net/ 获得的代理 IP 地址,但是当我运行 sript 时,我在 get 调用中输入的每个网站都有:
引发 ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.moma.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection)没有回应',)))
如果我删除 requests.get 中的代理指令,一切都已完成。 为什么使用代理我的脚本不起作用?是免费代理列表中列出的代理错误还是我必须更改我的 python 调用? 我使用 python 3.6
提前非常感谢 上午
【问题讨论】:
-
如果您不介意付费代理解决方案,您可以尝试使用gimmeproxy.com,它将验证其数据库中的所有代理。
标签: python-3.x web-scraping proxy