$mech->follow_link( url_regex => qr/find-c/ );
-diag "submit search $query";
+diag "submit search [$query] on ", $self->{database};
+
+ $self->save_content;
$mech->submit_form(
fields => {
}
+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";
+}
+
1;
use_ok 'Aleph';
-ok( my $o = Aleph->new, 'new' );
+ok( my $o = Aleph->new('ZAG01'), 'new' );
ok( my $hits = $o->search( 'WTI=linux' ), 'search' );
diag "$hits results";