我正在写一个pycurl脚本,它在linux上运行正常,但在mac os x上我收到错误:
Traceback (most recent call last):
File "curl.py", line 47, in <module>
c.perform()
pycurl.error: (7, "couldn't connect to host")
任何帮助?
由于
答案 0 :(得分:1)
curl.setopt(pycurl.PROXY, "url")
curl.setopt(pycurl.PROXYPORT, 8000)
curl.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)
答案 1 :(得分:0)
使用此解决:
c.setopt(pycurl.PROXY, "url")
c.setopt(pycurl.PROXYPORT, 8000)
c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)