如何仅从Google协作平台API内容Feed下载元数据?

时间:2012-10-02 15:02:42

标签: python gdata

我想下载Google协作平台网站中网页的网址列表。我正在使用Python API来执行此操作。它似乎比我预期的要慢,所以我认为它实际上是为每个条目下载整个内容而不仅仅是元数据。有没有办法只下载元数据?我的代码如下:

import gdata.sites.client

client = gdata.sites.client.SitesClient(site='mysite', domain='mydomain.com')
client.ClientLogin('foo@bar.com', 'password', 'test')
feed = client.GetContentFeed()
for entry in feed.entry:
    print entry.GetAlternateLink().href

1 个答案:

答案 0 :(得分:1)

最接近的是

https://sites.google.com/site/(your site name)/system/feeds/sitemap

很遗憾,此API不允许像某些较新的Google API那样使用fields