最近未上载工作相册API图片集

2024-10-04 03:27:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在从Picasa获取用户recently uploaded photos。根据文档示例请求url:

https://picasaweb.google.com/data/feed/api/user/userID?kind=photo&max-results=10

接收到响应,但不是根据给定的示例,在获取响应中的提要时缺少响应条目标记。在

代码片段:

credentials = SignedJwtAssertionCredentials(
      SERVICE_ACCOUNT_EMAIL,
      file(SERVICE_ACCOUNT_PEM_FILE_PATH, "rb").read(),
      scope=["https://picasaweb.google.com/data/"],
      prn=userEmail
    )
PHOTOS_URL = "https://picasaweb.google.com/data/feed/api/user/%s?kind=photo&max-results=10&alt=json"
http = httplib2.Http()
http = credentials.authorize(http)
response, albumPhotos = http.request(PHOTOS_URL %(userEmail), 'GET')
albumPhotos = json.loads(albumPhotos)

在响应中没有得到包含最近上传照片的feed的条目键。在


Tags: httpscomapihttp示例datafeedgoogle