开发者

Pycurl cannot connect to host

I am writing a pycurl script, which worked right on linux, but on mac os x 开发者_运维技巧I get the error:

Traceback (most recent call last):
  File "curl.py", line 47, in <module>
    c.perform()
pycurl.error: (7, "couldn't connect to host")

any help?

Thanks


curl.setopt(pycurl.PROXY, "url")
curl.setopt(pycurl.PROXYPORT, 8000)
curl.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)


solved using this:

c.setopt(pycurl.PROXY, "url")
c.setopt(pycurl.PROXYPORT, 8000)
c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜