【发布时间】:2018-09-16 22:39:50
【问题描述】:
我发出一个 GET 请求: requests.get(url, proxies={'https':'x.x.x.x:xxxx'})
如何验证请求是通过代理而不是从我的 IP 发出的?
【问题讨论】:
标签: python-3.x proxy get ip python-requests
我发出一个 GET 请求: requests.get(url, proxies={'https':'x.x.x.x:xxxx'})
如何验证请求是通过代理而不是从我的 IP 发出的?
【问题讨论】:
标签: python-3.x proxy get ip python-requests
我不确定它是否会显示您要查找的内容,但您也许可以启用日志记录并查看代理
logging.basicConfig() # you need to initialize logging, otherwise you will not see anything from requests
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
参考:http://docs.python-requests.org/en/master/api/
在代理使用上方的pa底部
【讨论】: