【发布时间】:2020-12-06 12:06:02
【问题描述】:
如果我使用这个代码,我每次都会出现这个错误
import requests
proxy_list = [
{"https": "45.14.173.23"},
]
for proxy in proxy_list:
requests.get('https://iplogger.org/1QMwp7', proxies=proxy)
.
Error code: requests.exceptions.ProxyError: HTTPSConnectionPool(host='iplogger.org', port=443): Max retries exceeded with url: /1QMwp7 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request')))
我确定我的代理正在运行。但是有什么问题呢?
【问题讨论】:
-
这是否回答了您的问题:stackoverflow.com/questions/8287628/…? (您需要传递字典(不是数组)并添加完整的 IP 地址)
标签: python proxy python-requests pycharm http-proxy