Skip to content

Instantly share code, notes, and snippets.

@themusicman
Created July 3, 2012 13:44
Show Gist options
  • Save themusicman/3039769 to your computer and use it in GitHub Desktop.
Save themusicman/3039769 to your computer and use it in GitHub Desktop.
Checks a site for links that lead to 404 pages
source "http://rubygems.org"
gem 'anemone'
require "rubygems"
require "bundler/setup"
require "anemone"
Anemone.crawl("http://example.com") do |anemone|
anemone.on_every_page do |page|
if page.code == 404
puts 'oops! ' + page.url
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment