]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/lib_spotify.rb
[core] unicode plugin that sets server encoding
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / lib_spotify.rb
index a30157c64f1904cc317438009350624d08e9a717..24caf4288234542d9a70af33112c4bd5c2488522 100644 (file)
@@ -71,7 +71,8 @@ module ::Spotify
   def self.get(service, method, query, page=1)
     query.tr!('-','')
     url = "http://ws.spotify.com/#{service}/1/#{method}?q=#{CGI.escape(query)}&page=#{page}"
-    xml = Irc::Utils.bot.httputil.get_response(url).body
+    xml = Irc::Utils.bot.httputil.get(url)
+    raise unless xml
     return REXML::Document.new(xml).root
   end