此 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'}
我有同样的问题,你有没有想过这个?包括自动完成在内的其他功能均无效