Ai
1 Star 0 Fork 0

Role/Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
googlemaps.py 391 Bytes
一键复制 编辑 原始数据 按行查看 历史
GauravSingh75 提交于 2020-10-02 11:38 +08:00 . Added Google Maps
import requests
import json
import geocoder
g = geocoder.ip('me')
lat = g.latlng[0]
longi = g.latlng[1]
query = input("Enter the query")
key = "your_api_key"
url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=" + \
str(lat) + "," + str(longi) + "radius=1000"
r = requests.get(url + 'query=' + query + '&key=' + key)
x = r.json()
y = x['results']
print(y)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/CRole/Python.git
git@gitee.com:CRole/Python.git
CRole
Python
Python
master

搜索帮助