Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Print Sitemap URLs
require 'open-uri'
require 'wayback_archiver' # requires `gem install wayback_archiver`
sitemap_urls = ARGV
sitemap_urls.map do |url|
sitemap_xml = open(url).read
sitemap = WaybackArchiver::Sitemap.new(sitemap_xml)
sitemap.urls
end.flat_map { |url| puts url }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.