-
-
Save tbuehlmann/88a9acfbe27508e21e14 to your computer and use it in GitHub Desktop.
catch open uri
This file contains hidden or 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
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