用微博官方提供的API place/nearby/pois 通过设置经纬度及区域半径抓取出所需地点的附近签到信息。
其实我想要的就是poiid那一行。
貌似直接调用对象方法就可以控制出哪行,但是我使用处理文本的方法处理的。
原文件josntest.txt是这样的(我抓的成都的):
写了个小程序
#read txt file
file=open("jsontest.txt","rt")
contents=file.read()
file.close()
#place them here
poiid=[]
#find poiid between quotes behind '"poiid":'one by one
while contents.find(&#