json - flickr.photos.search in python, get tags and exact geolocations for images -


the following python code have far. example of input file is

53.4667 -2.2333 manchester 52.4831 -1.8936 birmingham 53.4000 -3.0000 liverpool 48.8567 2.3508 paris 45.7600 4.8400 lyon 43.2964 5.3700 marseille 43.7034 7.2663 nice 

i input lat , lon of different cities, using accuracy 11, city level. want retrieve tags of images @ location along exact geo-locations of image. new python , don't think code achieving appreciated!

import flickrapi  api_key = "key" secret_api_key = "secret key" flickr = flickrapi.flickrapi(api_key, secret_api_key)  def obtainimages():      file = open('citylist.txt')     line in file:         fields = line.strip().split()         lat = fields[0]         lon = fields[1]         photo_list = flickr.photos.search(api_key=api_key, lat=lat, lon=lon, accuracy=11, format='parsed-json', per_page='100')          print(photo_list)   obtainimages() 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -