Created
December 15, 2008 02:22
-
-
Save jugyo/35853 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import gdata.photos.service | |
gd_client = gdata.photos.service.PhotosService() | |
user = '<ユーザーID>' | |
# アルバムの情報を取得 | |
albums = gd_client.GetUserFeed(user=user) | |
for album in albums.entry: | |
print 'Album: title=%s, id=%s' % ( | |
album.title.text, album.gphoto_id.text) | |
# 画像の情報を取得 | |
photos = gd_client.GetFeed( | |
'/data/feed/api/user/%s/albumid/%s?kind=photo' % ( | |
user, album.gphoto_id.text)) | |
for photo in photos.entry: | |
print ' Photo: title=%s, src=%s' % ( | |
photo.title.text, photo.content.src) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment