rss - 如何使用 YQL 合并 2 个按 pubDate 排序的 RSS 提要?

标签 rss yql yahoo-pipes

看到 YQL 被宣传为一种很好的做事方式,我很好奇如何使用 YQL 获取并合并 2 个不同的提要(按 pubDate 排序)。

获取 2 个提要非常简单,但事实证明这些提要只是连接在一起而不是合并。

这是示例代码。

select channel.title,channel.link,channel.item.title,channel.item.link
    from xml where url in(
      'http://code.flickr.com/blog/feed/rss/',
      'http://feeds.delicious.com/v2/rss/codepo8?count=15',
      'http://www.stevesouders.com/blog/feed/rss',
      'http://www.yqlblog.net/blog/feed/',
      'http://www.quirksmode.org/blog/index.xml'
    )

最佳答案

感谢您提供此信息。它也适用于访问 rss 对象:

select title,link,pubDate from rss where url in (
    'http://feeds.delicious.com/v2/rss/hasematzel?count=3',
    'http://oliverschwarz.tumblr.com/rss',
    'http://twitter.com/statuses/user_timeline/818226.rss',
    'http://hasematzel.de/blog/feed/',
    'http://piepmatzel.de/feed/'
) | sort(field="pubDate", descending="true")

这是创建新闻编辑室或生活流的一种非常简单的方法。不要忘记强制缓存 YQL 返回 :)

关于rss - 如何使用 YQL 合并 2 个按 pubDate 排序的 RSS 提要?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2718575/

相关文章:

iPhone RSS 阅读器——parseXML 不会加载某些 XML 提要

javascript - 查找历史雅虎财经报价

yahoo-pipes - 如何为 Yahoo! 配置更新间隔管道?

xml - Yahoo Pipes 有合适的替代品吗?

yahoo - YQL 丢失 HTML 元素属性?

java - 使用 Java 获取 iTunes RSS feed

php - 如何制作 "empty"RSS 提要

javascript - 使用 xpath 访问特定元素

c# - RSS C# 获取汇率

javascript - YQL JSON 脚本没有返回?