如何从 Picasa API 获取相册 URL?

发布于 2024-08-11 16:14:16 字数 569 浏览 3 评论 0原文

我真的不喜欢 Picasa 面向提要的 API。为什么他们不能创建 REST 接口?

有谁知道如何获取特定专辑的 URL?例如,假设我有:

gd_client = gdata.photos.service.PhotosService()
albums = gd_client.GetUserFeed(user="[email protected]")
album = albums.entry[0]

如何找到它的 URL?我正在寻找类似的东西:

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

这样当我点击它时,它会带我到 Picasa 查看该相册!

PS:请注意,您不能只将 album.title 放在那里,因为它可能包含空格,而且实际上并不相同。

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="[email protected]")
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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

栖迟 2024-08-18 16:14:16

您可以通过在条目上调用 .GetHtmlLink().href 来访问相册的 picasaweb 网址

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

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]
梦里泪两行 2024-08-18 16:14:16

转至 http://picasaweb.google.com/[用户名]/[相册标题] 获取相册网址。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文