Search code examples
pythonpicasa

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 anyone 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.


Solution

  • 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]