Skip to content

Instantly share code, notes, and snippets.

@rochefort
Created September 16, 2014 15:24
Show Gist options
  • Save rochefort/7df152da332cad37243e to your computer and use it in GitHub Desktop.
Save rochefort/7df152da332cad37243e to your computer and use it in GitHub Desktop.
chapger4-4-5 p.239
diff --git a/chapter4/anemone-errorcode.rb b/chapter4/anemone-errorcode.rb
index 2e08289..d532bfb 100644
--- a/chapter4/anemone-errorcode.rb
+++ b/chapter4/anemone-errorcode.rb
@@ -12,9 +12,9 @@ opts = {
Anemone.crawl(urls, opts) do |anemone|
anemone.on_every_page do |page|
puts page.url
- raise '500 Error!:' + page.url.path.to_s if page.code = 500
+ raise '500 Error!:' + page.url.path.to_s if page.code == 500
end
anemone.after_crawl do |pages|
puts "hoge"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment