Skip to content

Commit

Permalink
updated code to use exit rather abort
Browse files Browse the repository at this point in the history
  • Loading branch information
LoveMyData committed May 13, 2017
1 parent 365d1a5 commit 0b4e51b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper.rb
Expand Up @@ -28,7 +28,8 @@ def postback target, argument
page = agent.get(url)

if page.search("tr.pagerRow").empty?
abort('Nothing to scape')
puts 'Nothing to scape'
exit 0
end

while page.search("tr.pagerRow").search("td")[-1].inner_text == '...' do
Expand Down

0 comments on commit 0b4e51b

Please sign in to comment.