Skip to content

Commit

Permalink
Allow a spider to fail if it generates a 404
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 2, 2016
1 parent 03fdbc1 commit 43f6430
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rakefile
Expand Up @@ -45,7 +45,11 @@ task :crawl do
# Capitalize first letter of spider, eg; dharmaseed to Dharmaseed
# Then turn that string into a true language constant representing a class name
# Then call the .run() method on the object
spider.capitalize.constantize.new(recrawl: recrawl).run
begin
spider.capitalize.constantize.new(recrawl: recrawl).run
rescue OpenURI::HTTPError
puts "Skipping #{spider}"
end
end

else
Expand Down

0 comments on commit 43f6430

Please sign in to comment.