summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-03-23 17:06:06 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-03-23 17:06:06 +0100
commit08e27c3aa7aa63bdd2f65e26c431804a182aee84 (patch)
tree241c8976e84ea6619cf0106d78df77579d901c8c /data/rbot
parentc7fd2858c6080c775c932e3605e3f5e742eafece (diff)
youtube plugin: fix retrieval of ratings, views and faves
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/youtube.rb6
1 files changed, 3 insertions, 3 deletions
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, " ")