python - Google Places Find_Place API 请求不返回商家名称
问题描述
指定商家地址时,此 Python 脚本不返回商家名称。我希望公司名称“大力水手”会被退回。为什么不返回公司名称?“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'}
解决方案
推荐阅读
- c++ - 尝试编写一个 C++ 程序,列出上限值中的所有礼貌数字
- ios - 无法将数据转换为 UIImage
- google-chrome - 鼠标滚轮滚动功能在精确页面上很慢
- outlook - 在 Microsoft Outlook for Windows 客户端中发送
- javascript - 包裹跨度,悬停效果
- shell - 检查列值,如果为真则执行 shell,否则执行不同的 shell
- arrays - 附加函数在调整大小的数组中不起作用
- dart - <> 飞镖中的不同用途
- python - Django 随机 CSS 名称
- javascript - Vue 和 Laravel:让 Animated Div 响应式