add youtu.be short links
authorChristian Garbs <mitch@cgarbs.de>
Mon, 8 Feb 2010 20:54:11 +0000 (21:54 +0100)
committerRalf Ertzinger <ralf@skytale.net>
Mon, 8 Feb 2010 22:43:33 +0000 (23:43 +0100)
also fix dot detection in regexp

videosite/YouTubeGrabber.pm

index 199143e..4449d1f 100644 (file)
@@ -26,8 +26,9 @@ sub new {
     my $self = $class->SUPER::new();
 
     $self->{'NAME'} = 'youtube';
-    $self->{'PATTERNS'} = ['(http://(?:[-a-zA-Z0-9_.]+\.)*youtube.(?:com|de|co.uk)/watch\?(?:.+=.+&)*v=([-a-zA-Z0-9_]+))',
-                           '(http://(?:[-a-zA-Z0-9_.]+\.)*youtube.(?:com|de|co.uk)/v/([-a-zA-Z0-9_]+))'];
+    $self->{'PATTERNS'} = ['(http://(?:[-a-zA-Z0-9_.]+\.)*youtube\.(?:com|de|co.uk)/watch\?(?:.+=.+&)*v=([-a-zA-Z0-9_]+))',
+                           '(http://(?:[-a-zA-Z0-9_.]+\.)*youtube\.(?:com|de|co.uk)/v/([-a-zA-Z0-9_]+))',
+                          '(http://(?:[-a-zA-Z0-9_.]+\.)*youtu\.be/([-a-zA-Z0-9_]+))'];
     $self->{'_PARAMS'} = {
             'QUALITY' => ['normal', 'Quality of the video to download.', {
                     'normal' => 'standard resolution flash video',