The following code is from the gist on Feedzirra
to get the updated content from a RSS feed:
feed = Feedzirra::Feed.fetch_and_parse(feed_url)
feed = Feedzirra::Feed.update(feed)
do_something_with_new_feed(feed.new_entries) if feed.updated?
I don't understand how Feedzirra would know the feed has been updated. I can't get it working. In order to know, I would have to pass the Feed
object that was returned previously (minutes or hours ago) Feedzirra::Feed.fetch_and_parse(feed_url)
into Feedzirra::Feed.update
, no? How does it know if it has been updated if I use the feed that I had just fetch_and_parse?