def _async_photo_processing(self): #start downloading photo stream for cat in PHOTO_CATEGORIES: ps = PhotoStream() photo_list = ps.request_pop_photo_stream(cat, 0) located_photos = ps.get_located_photos(photo_list, cat) if len(located_photos) > 0: ps.save_photo_stream_to_db(located_photos, cat)
from pop_photo_grab import PhotoStream import json from db_helper import mydb ps = PhotoStream() col = mydb.photos photo_list = list(col.find().limit(10)) print len(photo_list) ps.parse_photo_stream(photo_list, 8)