Skip to content

Instantly share code, notes, and snippets.

View ksiomelo's full-sized avatar

Cassio Melo ksiomelo

View GitHub Profile
require 'rubygems'
require 'anemone'
require 'builder'
sitemap = ""
xml = Builder::XmlMarkup.new(:target => sitemap, :indent=>2)
xml.instruct!
xml.urlset(:xmlns=>'http://www.sitemaps.org/schemas/sitemap/0.9') {
Anemone.crawl("http://www.example.com/", :discard_page_bodies => true) do |anemone|