Parsing RSS code example using FeedTools

Y2J
Release: 2017-05-03 09:30:14
Original
1806 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!