开发者

How can I get an album URL from the Picasa API?

I really don't like the Picasa feed-oriented API. Why couldn't they create a REST interface?

Does anyon开发者_开发问答e know how I can get the URL for a particular album? For example, say I have:

gd_client = gdata.photos.service.PhotosService()
albums = gd_client.GetUserFeed(user="user@gmail.com")
album = albums.entry[0]

How can I find its URL? I am looking for something like:

http://picasaweb.google.com/username/AlbumTitle

so that when I click on it, it will take me to Picasa to view that album!

PS: Note that you cannot just put the album.title there because it might contain spaces, and it's not really the same.


you can access an album's picasaweb url through calling .GetHtmlLink().href on an entry

album_urls = [album.GetHtmlLink().href for album in albums.entry]


Get the album URL by going to http://picasaweb.google.com/[username]/[album title].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜