python 获取地图信息
来源:互联网 发布:网络3无internet访问 编辑:程序博客网 时间:2024/05/19 12:12
# -*-coding:utf-8-*-import urllibimport urllib2import jsondef download_pois(keywords,types,city,children,offset,page,extensions,key): keywords = keywords types = types city = city children = children offset = offset page = page extensions = extensions key = key # keywords = '北京大学' # types = '高等院校' # city = '北京' # children = 1 # offset = 20 # page = 1 # extensions = 'all' # key ='b9ca5e60b99fda0fc6fac6644f88c814' url = 'http://restapi.amap.com/v3/place/text?key='+str(key)+'&keywords='+str(keywords)+'&types='+str(types)+'&city='+str(city)+'&children='+str(children)+'&offset='+str(offset)+'&page'+str(page)+'&extensions='+str(extensions) response = urllib2.urlopen(url) res = response.read() file = open('1.txt','wb') file.write(res) file.close()if __name__ == '__main__': download_pois('北京大学','高等院校','北京','1','20','1','all','b9ca5e60b99fda0fc6fac6644f88c814')
如何让输出的文件 json格式化呢?
阅读全文
0 0
- python 获取地图信息
- android获取地图信息
- 地图 获取线路信息
- python获取硬件信息
- python获取系统信息
- python获取硬件信息
- python获取对象信息
- Python 获取对象信息
- Python 获取对象信息
- python获取操作系统信息
- python帮助信息获取
- phonegap3.4 + 百度地图获取地址信息
- 百度地图通过经纬度获取地址信息
- 百度地图根据坐标获取地址信息
- 百度地图通过经纬度获取地址信息
- 通过百度地图获取当地天气信息
- Python获取操作系统版本信息
- Python获取校内好友信息
- JavaScript学习总结(三)——逻辑And运算符详解
- baidu map
- 好像叫单点登录吧?(自用)
- 436
- 用VS新建一个C++类
- python 获取地图信息
- mongo数据库的各种查询语句示例(比较全的)
- 函数数组
- 6种负载均衡算法
- 中兴ZXMP S200光传输设备介绍
- 垃圾回收器
- MVC是什么?
- c# 数据库连接
- Intellij IDE 配置git