Use the first occurance of <div class="qoute">, the second one is used for ads
[quotesite.git] / quotesite / GermanBashGrabber.pm
index 3fb4e63..919f015 100644 (file)
@@ -19,7 +19,8 @@ sub new {
     my $self = $class->SUPER::new();
 
     $self->{'NAME'} = 'germanbash';
-    $self->{'PATTERNS'} = ['(http://(?:[-a-zA-Z0-9_.]+\.)*german-bash\.org/(\d+))'];
+    $self->{'PATTERNS'} = ['(http://(?:[-a-zA-Z0-9_.]+\.)*german-bash\.org/(\d+))',
+                           '(http://(?:[-a-zA-Z0-9_.]+\.)*german-bash\.org/action/show/id/(\d+))'];
 
     bless($self, $class);
     $self->_prepare_parameters();
@@ -57,6 +58,7 @@ sub _parse {
         if (exists($t->[1]->{'class'}) && ($t->[1]->{'class'} eq 'zitat')) {
             $metadata->{'CONTENT'} = $p->get_text('/div');
             $metadata->{'CONTENT'} =~ s/^\s*//mg;
+            last;
         }
     }