O'Reilly logo

Wicked Cool Ruby Scripts by Steve Pugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

RSS Parsing

RSS Parsing

rssParser.rb

Really Simple Syndication (RSS) is a wonderful technology that has been gaining popularity since early 2000. RSS feeds allow users to stay current on information that frequently changes, such as news headlines or product announcements. Many websites feature RSS feeds, and a feed reader is needed to extract the important data included in the feed.

Distribution can extend the functionality and interoperability of information. Ruby has a library which allows you to customize the way feeds are retrieved, published, aggregated, and manipulated. This script will allow you to retrieve information from No Starch's blog at http://nostarch.com/blog/?feed=rss2/.

The Code

 require 'rss/1.0' require 'rss/2.0' require 'open-uri' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required