如何在Google新闻RSS Feed中获取相关文章群集?

时间:2014-03-29 14:08:03

标签: rss google-news

Google在RSS新闻源中包含以下要求:

  

为每个相关文章添加指向Google新闻群集的链接   新闻项目,使用Google新闻Feed中提供的链接。

此链接应包含与当前项目相关的其他文章的集合。 RSS源中每个节点中的一个xml属性如下所示:

<guid isPermaLink="false">tag:news.google.com,2005:cluster=43982360597436</guid>

但是,我无法弄清楚如何使用它来获取相关文章的列表。有谁知道怎么做?

1 个答案:

答案 0 :(得分:1)

您需要查看RSS提要的顶部,特别是包含新闻群集链接的<link>节点。

例如:

<rss version="2.0">
  <channel>
    <generator>NFE/1.0</generator>
    <title>Google News</title>
    <link>http://news.google.com/news?pz=1&ned=us&hl=en&topic=snc&ncl=dd_4rHFR0wfHJ5M35r9VmSXgpLESM</link>
    <language>en</language>
    <webMaster>news-feedback@google.com</webMaster>
    <copyright>&amp;copy;2014 Google</copyright>
    <pubDate>Tue, 19 Aug 2014 03:31:53 GMT</pubDate>
    <lastBuildDate>Tue, 19 Aug 2014 03:31:53 GMT</lastBuildDate>
    ...

此处,<link>节点中的网址会将您带到构成新闻群集的a page showing all related articles

相关问题