cs9*_*s95 6 python proxy curl pycurl python-2.7
我正在使用 pycURL 通过 http 代理向 https 站点发出一些请求。
这是我的代码:
import pycurl
buf = cStringIO.StringIO()
c = pycurl.Curl()
c.setopt(c.URL, url) # 'url' is the base url of the form https://www.target.com
c.setopt(c.PROXY, proxy) # 'proxy' has the form 1.2.3.4:8080
c.setopt(c.WRITEFUNCTION, buf.write)
c.perform()
Run Code Online (Sandbox Code Playgroud)
我已经用不同的代理尝试过这段代码。我得到要么Proxy CONNECT aborted要么Received HTTP code 400 from proxy after CONNECT。
我有什么遗漏的吗?我应该使用 https 代理吗?我环顾四周,似乎找不到任何有关 pycURL 用法的帮助或文档。
任何帮助表示赞赏。谢谢!
小智 0
我有一个与你类似的问题,我的错误日志是: fatal: unavailable to access ' https://github.com/nhn/raphael.git/ ': Received HTTP code 400 from proxy after CONNECT 所以我使用这些常见的解决我的问题,首先查看你的git配置文件
git config --global --edit 然后删除配置 [remote "origin"] proxy = https://github.com/facette/facette.git
| 归档时间: |
|
| 查看次数: |
6101 次 |
| 最近记录: |