- Do not treat & as a parameter separator
authorRalf Ertzinger <sun@lain.camperquake.de>
Fri, 23 May 2008 19:14:28 +0000 (21:14 +0200)
committerRalf Ertzinger <sun@lain.camperquake.de>
Fri, 23 May 2008 19:14:28 +0000 (21:14 +0200)
videosite/YouTubeGrabber.pm

index f4bac10..6551f7a 100644 (file)
@@ -94,7 +94,7 @@ sub _parse {
         } elsif ('script' eq $tag->[0]) {
             $e = $p->get_text();
             if ($e =~ m|/watch_fullscreen\?(.+)\x27|) {
-                my %args = map { split(/=/, $_, 2); } split(/&/, $1);
+                my %args = map { split(/=/, $_, 2); } split(/&(?!amp;)/, $1);
                 $metadata->{'DLURL'} = sprintf('http://www.youtube.com/get_video.php?video_id=%s&t=%s%s',
                         $metadata->{'ID'}, $args{'t'}, $append);
                 $self->debug('URL found: %s', $metadata->{'DLURL'});