projects
/
Biblio-Z3950.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57eba35
)
fix Aleph scraper
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 22 Oct 2010 23:23:08 +0000
(
01:23
+0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 22 Oct 2010 23:23:08 +0000
(
01:23
+0200)
Aleph.pm
patch
|
blob
|
history
diff --git
a/Aleph.pm
b/Aleph.pm
index
71d67a7
..
971e418
100644
(file)
--- a/
Aleph.pm
+++ b/
Aleph.pm
@@
-8,9
+8,6
@@
use Data::Dump qw/dump/;
use base 'Scraper';
-our $mech = WWW::Mechanize->new();
-our $hits;
-
sub diag {
print "# ", @_, $/;
}
@@
-60,8
+57,7
@@
sub usemap {{
# 12 => '',
# 1007 => '',
# 1016 => '',
-
-};
+}};
sub search {
@@
-89,7
+85,7
@@
diag "submit search $query";
},
);
- $hits = 0;
+
my
$hits = 0;
if ( $mech->content =~ m{ukupno\s+(\d+).*(do\s+(\d+))}s ) {
$hits = $1;
$hits = $2 if $2 && $2 < $1; # correct for max. results