From 16c921257d38522fd2930b1ee8d52675f0d4f1e0 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 15 Sep 2011 11:40:44 +0200 Subject: youtube: not all urls have v= as first CGI param --- data/rbot/plugins/youtube.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/rbot/plugins/youtube.rb b/data/rbot/plugins/youtube.rb index 01f494d1..aede86e8 100644 --- a/data/rbot/plugins/youtube.rb +++ b/data/rbot/plugins/youtube.rb @@ -12,7 +12,7 @@ class YouTubePlugin < Plugin YOUTUBE_SEARCH = "http://gdata.youtube.com/feeds/api/videos?vq=%{words}&orderby=relevance" YOUTUBE_VIDEO = "http://gdata.youtube.com/feeds/api/videos/%{id}" - YOUTUBE_VIDEO_URLS = %r{youtube.com/(?:watch\?v=|v/)(.*?)(&.*)?$} + YOUTUBE_VIDEO_URLS = %r{youtube.com/(?:watch\?(?:.*&)?v=|v/)(.*?)(&.*)?$} Config.register Config::IntegerValue.new('youtube.hits', :default => 3, -- cgit v1.2.3