single field search mapping to fill text indexes
[Biblio-Z3950.git] / Scraper.pm
index 535f7b5..692a4c6 100644 (file)
@@ -18,6 +18,8 @@ sub new {
     return $self;
 }
 
+sub mech { $_[0]->{mech} }
+
 sub save_marc {
        my ( $self, $id, $marc ) = @_;
 
@@ -35,4 +37,16 @@ sub save_marc {
 
 }
 
+our $dump_nr = 1;
+
+sub save_content {
+       my $self = shift;
+       my $path = "/tmp/$dump_nr.html";
+       open(my $html, '>', $path);
+       print $html $self->{mech}->content;
+       close($html);
+       warn "# save_content $path ", -s $path, " bytes";
+       $dump_nr++;
+}
+
 1;