开发者

Pycurl cannot connect to host

开发者 https://www.devze.com 2022-12-22 06:35 出处:网络
I am writing a pycurl script, which worked right on linux, but on mac os x 开发者_运维技巧I get the error:

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

精彩评论

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