Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 29 by
t.ha...@googlemail.com: Retrieve user location of photo
https://code.google.com/p/flickrpy/issues/detail?id=29
Hi, sorry I'm relatively new to python. I have a question regarding my
code. I'm stuck when I try to scrape the user's locations (not the
picture's locations). Here's my code:
#FLICKR API SCRIPT
from flickr import *
#PERSONAL API KEY & PASSWORD
flickr.API_KEY = '8a5710b69be295ec77a205XXXXXXXXXX'
flickr.API_SECRET = '41e94XXXXXXXXX'
#GET PHOTOS BY TAG:
photos = photos_search(tags='manhattan', pages= '2', per_page='100')
print len(photos)
print photos
#GET PHOTO LOCATION:
geolist = []
for i in photos:
if i.getLocation() != None:
geolist.append(i.getLocation())
print len(geolist)
print geolist
#GET USERS:
owners = []
for i in photos:
if i.getLocation() != None:
owners.append(i.owner)
print len(owners)
print owners
#GET USER PROPERTIES GENERAL:
ownerprop = []
for i in owners:
ownerprop.append(i._load_properties)
print len(ownerprop)
print ownerprop
#GET USER LOCATION:
ownerloc = []
for i in owners:
print i.__location
The general properties should include location of the owner, but they
return this weird object I can't perform any functions on. Here's the link
to the flickr module code:
http://flickrpy.googlecode.com/svn/trunk/flickr.py
Any ideas?
Another thing is that the page maximum of pictures is 500 and I somehow can
only pull data from 1 page, even though I set the "pages" parameter to 2,
to 'all', and few others I thought of. It never gives me error messages,
but the data is pulled for only 500 images. Of those, only about 10-30%
have geo tags, way too few to make a map...
Thanks in advance!
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings