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)
精彩评论