From 08e27c3aa7aa63bdd2f65e26c431804a182aee84 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 23 Mar 2008 17:06:06 +0100 Subject: youtube plugin: fix retrieval of ratings, views and faves --- data/rbot/plugins/youtube.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/youtube.rb b/data/rbot/plugins/youtube.rb index 68eb1d51..2f009f11 100644 --- a/data/rbot/plugins/youtube.rb +++ b/data/rbot/plugins/youtube.rb @@ -55,9 +55,9 @@ class YouTubePlugin < Plugin :cat => (e.elements["media:group/media:category"].text rescue nil), :seconds => (e.elements["media:group/yt:duration/@seconds"].value.to_i rescue nil), :url => (e.elements["media:group/media:player/@url"].value rescue nil), - :rating => (("%s/%s" % [e.elements["media:group/gd:rating/@average"].value, e.elements["media:group/gd:rating/@max"].value]) rescue nil), - :views => (e.elements["media:group/yt:statistics/@viewCount"].value rescue nil), - :faves => (e.elements["media:group/yt:statistics/@favoriteCount"].value rescue nil) + :rating => (("%s/%s" % [e.elements["gd:rating/@average"].value, e.elements["gd:rating/@max"].value]) rescue nil), + :views => (e.elements["yt:statistics/@viewCount"].value rescue nil), + :faves => (e.elements["yt:statistics/@favoriteCount"].value rescue nil) } if vid[:desc] vid[:desc].gsub!(/\s+/m, " ") -- cgit v1.2.3