Add a new youtube URL format
authorRalf Ertzinger <sun@ryoko-darknet.camperquake.de>
Fri, 5 Mar 2010 13:51:38 +0000 (14:51 +0100)
committerRalf Ertzinger <sun@ryoko-darknet.camperquake.de>
Fri, 5 Mar 2010 13:51:38 +0000 (14:51 +0100)
videosite/YouTubeGrabber.pm

index 4449d1f..4d585f2 100644 (file)
@@ -28,7 +28,8 @@ sub 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_]+))',
-                          '(http://(?:[-a-zA-Z0-9_.]+\.)*youtu\.be/([-a-zA-Z0-9_]+))'];
+                           '(http://(?:[-a-zA-Z0-9_.]+\.)*youtu\.be/([-a-zA-Z0-9_]+))',
+                           '(http://(?:[-a-zA-Z0-9_.]+\.)*youtube\.(?:com|de|co.uk)/user/\w+\?.*/([-a-zA-Z0-9_]+))'];
     $self->{'_PARAMS'} = {
             'QUALITY' => ['normal', 'Quality of the video to download.', {
                     'normal' => 'standard resolution flash video',
@@ -245,6 +246,8 @@ sub __login {
         return undef;
     }
 
+    $self->debug("Got a cookie");
+
     $r = $ua->get($videourl);
     if ($r->base->as_string() =~ m,/verify_age,) {
         $self->debug("Looking for session token...");