Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Feedalizer: Easy Webpage to RSS Conversion from Ruby

By Peter Cooper / August 11, 2006


Feedalizer is a Ruby library that lets you easily scrape Web pages and convert them into RSS feeds. Some demo code that generates a feed:

require "feedalizer"
require "time"

url = ""

feedalize(url) do
  feed.title = "Nemi"
  feed.about = "..."
  feed.description = "Daily Nemi strip scraped from Sydsvenskan"

  scrape_items("option") do |rss_item, html_element|  = html_element.attributes["value"]  = Time.parse(html_element.innerHTML)
    rss_item.title ="%Y-%m-%d")

    # This grabs the page for a particular strip and extracts the relevant img element
    rss_item.description = grab_page("//img[@width=748]")


Other Posts to Enjoy

Twitter Mentions