【发布时间】:2014-10-05 12:01:11
【问题描述】:
我正在从 Picasa 获取用户 recently uploaded photos。如parameters doc. 中所述,您可以使用 max-results 和 start-index 组合对响应进行分页。但这似乎不起作用。
不同起始索引的请求示例:
两个请求都返回相同的结果。 start-index 没有影响。
我已在GData Issues 上发布此消息,但尚未收到任何回复。
我正在尝试的代码 sn-p:
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=5&alt=json&start-index=%s&imgmax=d"
http = httplib2.Http()
http = credentials.authorize(http)
response, albumPhotos = http.request(PHOTOS_URL %(userEmail, startIndex), 'GET')
albumPhotos = eval(albumPhotos)
有什么想法吗?
【问题讨论】:
-
确实,现在 API 好像严重损坏了
-
Api 还是坏了(
标签: python google-api gdata picasa