我有一些WordPress的博客,RSS提要。 我想知道是否更新了1个RSS。这样我就可以运行resque作业了。Rails - WordPress的RSS提要监听器/通知器
是否有任何rubygem可以确定RSS源是否更新?
像RSS提要通知宝石。
我有一些WordPress的博客,RSS提要。 我想知道是否更新了1个RSS。这样我就可以运行resque作业了。Rails - WordPress的RSS提要监听器/通知器
是否有任何rubygem可以确定RSS源是否更新?
像RSS提要通知宝石。
一种不同的方法:使用https://www.ruby-toolbox.com/categories/feed_parsing并检查用于与计划作业(周期性地例如每5小时)的最新消息,并获取它相应
看一看Feedzirra
解析馈送到内部存储器。它能够做你需要的东西:
# updating a single feed
updated_feed = Feedzirra::Feed.update(feed)
# an updated feed has the following extra accessors
updated_feed.updated? # returns true if any of the feed attributes have been modified. will return false if only new entries
updated_feed.new_entries # a collection of the entry objects that are newer than the latest in the feed before update
# updating multiple feeds. it expects a collection of feed objects
updated_feeds = Feedzirra::Feed.update(feeds.values)
检查Feedzirra的自述文件,了解其他可用的方法。