simple Ruby RSS reader
require 'rss/2.0' require 'open-uri' class RssReader def parseFeed (url, length) feed_url = url output = ""; open(feed_url) do |http| response = http.read result = RSS::Parser.parse(response, false) output = "\"feedTitle\">#{result.channel.title}
- "
result.items.each_with_index do |item, i|
output += "
- \" #{item.link}\">#{item.title}" if ++i < length end output += "