# File lib/mirimiri/document.rb, line 143 def self.get_url(name) raise ArgumentError, "Bad encoding", name unless name.isutf8 atts = REXML::Document.new(Net::HTTP.get( URI.parse "http://en.wikipedia.org/w/api.php?action=query&titles=#{URI.escape name}&inprop=url&prop=info&format=xml" ).toutf8).elements['api/query/pages/page'].attributes atts['fullurl'] if atts['missing'].nil? end