fix quoting in AsyncWgetFileGetter again
[videosite.git] / videosite / MotherlessGrabber.pm
index 681b733..9f3feaa 100644 (file)
@@ -20,8 +20,8 @@ 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]+))'],
         @_,
     );
 
@@ -59,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();