X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite%2FYouTubeGrabber.pm;h=f4bac102695f61c02fffc588f8a7486f706ae49e;hb=bd9a8a86176b546d3336587a8f28f9c25299f5f6;hp=1a470490a1f475ba0097a3823865a3f4dba98c8c;hpb=16d90e707207666ebe27b664270cca7401b92f37;p=videosite.git diff --git a/videosite/YouTubeGrabber.pm b/videosite/YouTubeGrabber.pm index 1a47049..f4bac10 100644 --- a/videosite/YouTubeGrabber.pm +++ b/videosite/YouTubeGrabber.pm @@ -81,7 +81,7 @@ sub _parse { return undef; } } - $content = $r->decoded_content(); + $content = $r->content(); $p = HTML::TokeParser->new(\$content); @@ -100,7 +100,7 @@ sub _parse { $self->debug('URL found: %s', $metadata->{'DLURL'}); } } elsif ('div' eq $tag->[0]) { - if ('errorBox' eq $tag->[1]->{'class'}) { + if (exists($tag->[1]->{'class'}) and ('errorBox' eq $tag->[1]->{'class'})) { $self->error("Could not get video data for youtube %s: %s", $metadata->{'ID'}, $p->get_trimmed_text()); return undef;