Skip to content

Instantly share code, notes, and snippets.

@ericfode
Last active December 30, 2015 02:19
Show Gist options
  • Save ericfode/7761994 to your computer and use it in GitHub Desktop.
Save ericfode/7761994 to your computer and use it in GitHub Desktop.
New version... It works now
require 'anemone'
Anemone.crawl("http://localhost:3000") do |a|
a.on_every_page do |page|
puts "#{page.code}, #{page.links}, #{page.url}"
end
end
#!/bin/sh
echo "crawling"
logs=$(ruby crawler.rb)
echo "$logs" > logs.txt
echo "$logs" | grep -v "^200"
##### TO START SERVER do something like this the port is important... (though it should not be)
gem install adsf
adsf -p 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment