【发布时间】:2014-01-25 02:06:37
【问题描述】:
我无法使用 httplib2 连接到网站。我的电脑在防火墙后面,正如https://code.google.com/p/httplib2/wiki/Examples 建议的那样,我做了如下操作:
import httplib2
from httplib2 import socks
http = httplib2.Http(proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_HTTP, <proxy host address>, 8080, proxy_user = <proxy user id>, proxy_pass = <proxy password>))
resp, content = http.request("http://google.com", "GET")
但是,我还是得到了
httplib2.ServerNotFoundError: Unable to find the server at google.com
我的电脑可以正常使用 urllib2。有谁能够帮助我?
【问题讨论】: