简体   繁体   中英

Python geocoder library: How to set proxy IP?

I have using Python geocoder library for accessing coordinates. I could not find way to set proxy address for bulk accessing.

From the geocoder docs :

>>> import geocoder
>>> proxies = {'http':'http://108.165.33.12:3128'}
>>> g = geocoder.google('New York City', proxies=proxies)
>>> g.json
...

geocoder uses requests , so see here for more info:

http://docs.python-requests.org/en/master/user/advanced/#proxies

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM