git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93a703d
)
Youtube: Add new error condition detection
author
Ralf Ertzinger
<ralf@skytale.net>
Mon, 28 Feb 2011 17:36:27 +0000
(18:36 +0100)
committer
Ralf Ertzinger
<ralf@skytale.net>
Mon, 28 Feb 2011 17:36:27 +0000
(18:36 +0100)
videosite/YouTubeGrabber.pm
patch
|
blob
|
history
diff --git
a/videosite/YouTubeGrabber.pm
b/videosite/YouTubeGrabber.pm
index
2a363da
..
4d60423
100644
(file)
--- a/
videosite/YouTubeGrabber.pm
+++ b/
videosite/YouTubeGrabber.pm
@@
-216,7
+216,10
@@
sub _parse {
last SWF_ARGS;
}
} elsif ('div' eq $tag->[0]) {
- if (exists($tag->[1]->{'class'}) and ('yt-alert-content' eq $tag->[1]->{'class'})) {
+ $self->debug(Dumper($tag));
+ if (exists($tag->[1]->{'id'}) and ('watch-player-unavailable-message-container' eq $tag->[1]->{'id'})) {
+ # Search forward to the next <div>
+ $tag = $p->get_tag('div');
$self->error("Could not get video data for youtube %s: %s",
$metadata->{'ID'}, $p->get_trimmed_text());
return undef;