2

Google 包含以下要求以使用 RSS 新闻提要:

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

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

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

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

4

1 回答 1

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>在这里,节点中的 URL将带您到一个页面,该页面显示了构成新闻集群的所有相关文章。

于 2014-08-19T03:39:15.103 回答