credentials = ServiceAccountCredentials.from_p12_keyfile(
SERVICE_ACCOUNT_EMAIL, KEY_FILE_LOCATION, scopes=SCOPES)
# 设置代理 Goproxy 127.0.0.1 8087
socks.setdefaultproxy(socks.PROXY_TYPE_HTTP, proxy_host, proxy_port)
socks.wrapmodule( httplib2)
http = credentials.authorize( httplib2.Http(timeout=35))
analytics = build('analytics', 'v4', http=http,
discoveryServiceUrl=DISCOVERY_URI)
goproxy会有错误,因为证书的原因。
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
有人遇到过类似问题没,怎么解决?
1
sbmzhcn OP 顺便说下:
disable_ssl_certificate_validation=True 没任何作用的。 |