我正在尝试从 Google+ 下载原始完整图像尺寸。
import gdata.photos.service
import gdata.media
import gdata.geo
gd_client = gdata.photos.service.PhotosService()
username =
album_id =
photos = gd_client.GetFeed(
'/data/feed/api/user/%s/albumid/%s?kind=photo' % (
username, album_id))
first_entry = photos.entry[0]
first_entry.size
返回正确的大小(原始图像)。但是 first_entry.content.src
返回的 URL 不是原始分辨率和大小。
这个link和 this one给出一些相关的东西。但它们不是您通过单击图片预览上的“下载照片”获得的原始图像尺寸。
但即使如上面的链接所示的 first_entry.media.content[0].url
,它也不是图像的原始大小。
我点击了这个链接:Google Picasa Web Album API
最佳答案
我实现了以下...
def GetUserFeedHiRes(self, factory, kind='album', user='default', limit=None):
uri = "/data/feed/api/user/%s?kind=%s&imgmax=d" % (user, kind)
gd_client=factory.GetPhotoService()
return gd_client.GetFeed(uri, limit=limit)
查看问题中的代码,您只需添加 &imgmax=d
组件
关于python - 从 Google Picasa 网络相册 API 下载全尺寸/原始图像尺寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33588410/