简体   繁体   English

Python Geocoder库:如何设置代理IP?

[英]Python geocoder library: How to set proxy IP?

I have using Python geocoder library for accessing coordinates. 我已使用Python Geocoder库访问坐标。 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: geocoder使用requests ,因此请参阅此处以了解更多信息:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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