X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite%2FSnotrGrabber.pm;h=87b7a102bb629a071a5ab10b8bbe2fafac6371bb;hb=8d918b07ad100a4d7b96cf5df640cef0a8a0411d;hp=5b6ccfbf305e8b240e8c2e683e3eec12d3799571;hpb=6febaffb56a90b6a46544ff04eb3bc0f0593d685;p=videosite.git diff --git a/videosite/SnotrGrabber.pm b/videosite/SnotrGrabber.pm index 5b6ccfb..87b7a10 100644 --- a/videosite/SnotrGrabber.pm +++ b/videosite/SnotrGrabber.pm @@ -15,15 +15,15 @@ use strict; sub new { my $class = shift; - my $self = $class->SUPER::new(); - - $self->{'NAME'} = 'snotr'; - $self->{'PATTERNS'} = ['(http://(?:[-a-zA-Z0-9_.]+\.)*snotr\.com/video/(\d+))']; - - bless($self, $class); - $self->_prepare_parameters(); - - return $self; + my $self = $class->SUPER::new( + NAME => 'snotr', + _SELFTESTURL => 'http://www.snotr.com/video/1836', + _SELFTESTTITLE => 'Brilliant thief', + PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*snotr\.com/video/(\d+))'], + @_, + ); + + return bless($self, $class); } sub _parse { @@ -51,7 +51,7 @@ sub _parse { return undef; } - $n = $p->findnodes('meta[@name="title"]'); + $n = $p->findnodes('meta[@property="og:title"]'); if (defined($n)) { $metadata->{'TITLE'} = $n->{'content'}; }