Last active
December 30, 2015 02:19
-
-
Save ericfode/7761994 to your computer and use it in GitHub Desktop.
New version... It works now
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'anemone' | |
Anemone.crawl("http://localhost:3000") do |a| | |
a.on_every_page do |page| | |
puts "#{page.code}, #{page.links}, #{page.url}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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