Created
October 24, 2012 03:23
-
-
Save capotej/3943491 to your computer and use it in GitHub Desktop.
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
require 'open-uri' | |
failed = [] | |
File.read('File.txt').lines.each do |x| | |
begin | |
sleep 1 | |
st = Time.now.to_f | |
puts "#{x}: #{open(x).status} in #{(et - st)}" | |
et = Time.now.to_f | |
rescue | |
failed << x | |
end | |
end | |
File.open('failed.txt', 'w') { |f| f.print failed.join("\n") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment