Return to Snippet

Revision: 3500
at August 3, 2007 08:09 by burke


Initial Code
%w[uri net/http rexml/document].each{|l|require l};(REXML::Document.new(Net::HTTP.get_response(URI.parse(ARGV[0])).read_body)).elements.each("//a/@href").collect{|l|l.to_s}.sort!.uniq!.each{|l|puts l}

Initial URL


Initial Description
Only works on valid XML (ie. XHTML, but not HTML). Grabs an alphabetized list of links from the given URL.

Initial Title
Get links from a URL

Initial Tags
xhtml

Initial Language
Ruby