如何解决Google Places Find_Place API 请求未返回商家名称
当指定商家地址时,此 Python 脚本不会返回商家名称。我希望返回商业名称“Popeye's”。为什么不返回公司名称? “fields= ['name']”参数有问题吗?
import googlemaps
import pprint
import time
import os
API_KEY = os.getenv('API_KEY')
gmaps = googlemaps.Client(key = API_KEY)
name_result = gmaps.find_place(input=”5949 NE Martin Luther King Jr Blvd,Portland,OR 97211”,input_type= “textquery”,fields= ['name'])
pprint.pprint(name_result)
{'candidates': [{'name': '5949 NE Martin Luther King Jr Blvd'}],'status': 'OK'}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。