Created
June 7, 2015 18:25
-
-
Save b4dtR1p/5fbd8e63d28633b9a62d to your computer and use it in GitHub Desktop.
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 'mechanize' | |
agent = Mechanize.new | |
puts 'Insert URL in obsolete form:' | |
puts 'ex: http://google.com' | |
web = gets | |
page = agent.get(web) | |
page.links_with(:href => /^https?/).each do |link| | |
puts link.href | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment