X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite%2FMotherlessGrabber.pm;h=9f3feaa597789483d073c9a79ceeee10333c2a96;hb=13d23a6f19e2f8192d894171aaecc7987044a72a;hp=0b2487038c15cfcfbcdfca322461608d87846b69;hpb=17bca93d2b471f5f099a4046297159a029989430;p=videosite.git diff --git a/videosite/MotherlessGrabber.pm b/videosite/MotherlessGrabber.pm index 0b24870..9f3feaa 100644 --- a/videosite/MotherlessGrabber.pm +++ b/videosite/MotherlessGrabber.pm @@ -20,8 +20,9 @@ sub new { my $self = $class->SUPER::new( NAME => 'motherless', _SELFTESTURL => 'http://motherless.com/4976432', - _SELFTESTTITLE => 'Teen masturbation in shower', - _PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*motherless.com/([a-zA-Z0-9]+))'], + _SELFTESTTITLE => 'Teen Masturbating In Shower', + PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*motherless.com/([a-zA-Z0-9]+))'], + @_, ); return bless($self, $class); @@ -58,11 +59,9 @@ sub _parse { $p = HTML::TokeParser->new(\$content); # Look for the title - while ($tag = $p->get_tag('title', 'script')) { - if ('title' eq $tag->[0]) { - my $t = $p->get_text(); - $metadata->{'TITLE'} = $t; - $metadata->{'TITLE'} =~ s/.* : *//; + while ($tag = $p->get_tag('meta', 'script')) { + if (('meta' eq $tag->[0]) and ($tag->[1]->{'name'}) and ($tag->[1]->{'name'} eq 'description')) { + $metadata->{'TITLE'} = $tag->[1]->{'content'}; } elsif ('script' eq $tag->[0]) { my $t = $p->get_text();