-
-
Save hitode909/8e3fde72960e9adbbc7b5cbf4e0d5861 to your computer and use it in GitHub Desktop.
Extract and print the URLs
This file contains 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 'uri' | |
while line = gets | |
begin | |
URI.extract(line, ['http', 'https']).each do |uri| | |
puts uri | |
end | |
rescue | |
end | |
end |
This file contains 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
Gem::Specification.new do |spec| | |
spec.name = "urls" | |
spec.version = "0.0.3" | |
spec.authors = ["hitode909"] | |
spec.email = ["hitode909@gmail.com"] | |
spec.summary = "Extract and print the URLs" | |
spec.files = ["urls"] | |
spec.bindir = "." | |
spec.executables = ["urls"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment