fballprofilepic.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:Facebook-Scripts 作者: Sunil02324 项目源码 文件源码
def process_photos(photos):
  if 'error' in photos:
    print "Error = ", error
    raise Exception("Error in Response")

  no_of_photos = 0
  if 'data' not in photos:
    return
  while len(photos['data']) > 0:
    for photo in photos['data']:
      if 'tags' in photo:
        process_photo_tags(photo['tags'])
      if 'comments' in photo:
        process_photo_comments(photo['comments'])
      no_of_photos += 1
      stdout.write("\rNumber of Photos Processed = %d" % no_of_photos)
      stdout.flush()
    if 'paging' in photos and 'next' in photos['paging']:
      request_str = photos['paging']['next'].replace('https://graph.facebook.com/', '')
      request_str = request_str.replace('limit=25', 'limit=200')
      photos = graph.get(request_str)
    else:
      photos['data'] = []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号