Skip to content

Instantly share code, notes, and snippets.

@tbuehlmann
Forked from anonymous/untitled
Last active September 12, 2015 07:58
Show Gist options
  • Save tbuehlmann/88a9acfbe27508e21e14 to your computer and use it in GitHub Desktop.
Save tbuehlmann/88a9acfbe27508e21e14 to your computer and use it in GitHub Desktop.
catch open uri
urls.each do |url|
begin
open(url)
# do some nokogiri things
rescue OpenURI::HTTPError
# log the error
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment