Google API + proxy + httplib2

与世无争的帅哥 提交于 2019-12-05 07:12:25

rather than using Python2, I think you'd better try using httplib2shim

You can have a look at this tutorial on my blog : https://dinatam.com/fr/python-3-google-api-proxy/

In simple words, just replace this kind of code :

from httplib2 import Http
http_auth = credentials.authorize(Http())

by this one :

import httplib2shim
http_auth = credentials.authorize(httplib2shim.Http())

I decided to recode my web app in Python 2, still using the httplib2 package. Proxy info are now taken into account. It now works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!