doc = REXML::Document.new(s[:text])
title = doc.elements["feed/title"].text
doc.elements.each("*/entry") { |e|
doc = REXML::Document.new(s[:text])
title = doc.elements["feed/title"].text
doc.elements.each("*/entry") { |e|
- resp, xml = @bot.httputil.get_response(url)
- unless Net::HTTPSuccess === resp
+ resp = @bot.httputil.get_response(url)
+ xml = resp.body
+ unless resp.kind_of? Net::HTTPSuccess
what = params[:words].to_s
searchfor = CGI.escape what
url = YOUTUBE_SEARCH % {:words => searchfor}
what = params[:words].to_s
searchfor = CGI.escape what
url = YOUTUBE_SEARCH % {:words => searchfor}
- resp, xml = @bot.httputil.get_response(url)
- unless Net::HTTPSuccess === resp
+ resp = @bot.httputil.get_response(url)
+ xml = resp.body
+ unless resp.kind_of? Net::HTTPSuccess
plugin.map "youtube info :movie", :action => 'info', :threaded => true
plugin.map "youtube [search] *words", :action => 'search', :threaded => true
plugin.map "youtube info :movie", :action => 'info', :threaded => true
plugin.map "youtube [search] *words", :action => 'search', :threaded => true