Home  >  Article  >  Backend Development  >  Parsing RSS code example using FeedTools

Parsing RSS code example using FeedTools

Y2J
Y2JOriginal
2017-05-03 09:30:141817browse

require 'rubygems'
require 'feed_tools'
 
feed = FeedTools::Feed.open('http://www.rubyinside.com/feed/')
 
puts "This feed's title is #{feed.title}"
puts "This feed's Web site is at #{feed.link}"
 
feed.items.each do |item|
  puts item.title + "\n---\n" + item.description + "\n\n"
end

The above is the detailed content of Parsing RSS code example using FeedTools. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn