python - 从 Google Picasa 网络相册 API 下载全尺寸/原始图像尺寸

标签 python google-api picasa

我正在尝试从 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 不是原始分辨率和大小。

这个linkthis 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/

相关文章:

automation - 从 Picasa 导出面孔

python - 自动化无聊的东西 Collat​​z 项目

python - 检测对比图像的纹理背景

python - Biopython:如何避免蛋白质中的特定氨基酸序列以绘制 Ramachandran 图?

ios - 链接 Google API iOS 静态库

python - 即使 access_type 为 ='offline',Google OAuth2 也不会发布刷新 token ?

google-api - 服务帐户是否被视为 Google Sheets API v4 使用限制中的用户?

android - 从 Android 连接到 Picasa

python - SQLObject - 更新多条记录

iphone - 获取 GDataFeedPhotoAlbum 返回错误的对象类型