# Koha Z39.50 query:
#
# Bib-1 @and @and @and @and @and @and @and @or
-# @attr 1=8 isbn-issn
-# @attr 1=7 isbn-issn
# @attr 1=4 title
+# @attr 1=7 isbn
+# @attr 1=8 issn
# @attr 1=1003 author
# @attr 1=16 dewey
# @attr 1=21 subject-holding
# WYR - Godina izdavanja
sub usemap {{
- 4 => 'WTI',
- 1003 => 'AUT',
- 16 => 'DDC',
- 21 => 'SUB',
- 12 => 'LCN',
+ 4 => 'WTI=',
+ 7 => 'ISBN=',
+ 8 => 'ISSN=',
+ 1003 => 'AUT=',
+ 16 => 'DDC=',
+ 21 => 'SUB=',
+ 12 => 'LCN=',
# 1007 => '',
- 1016 => 'WRD',
+ 1016 => 'WRD=',
}};
our $session_id;
$session_id ||= int rand(1000000000);
# FIXME allocate session just once
- my $url = 'http://161.53.240.197:8991/F?RN=' . $session_id;
+ my $url = 'http://katalog.nsk.hr/F?RN=' . $session_id;
# fake JavaScript code on page which creates random session
diag "get $url";
);
my $hits = 0;
- if ( $mech->content =~ m{ukupno\s+(\d+).*do\s+(\d+)}s ) {
+ if ( $mech->content =~ m{ukupno\s+(\d+).*do\s+(\d+)}s ) { # FIXME Many results in Crotian
$hits = $1;
$hits = $2 if $2 && $2 < $1; # correct for max. results
+ } elsif ( $mech->content =~ m{(\d+)\s+od\s+(\d+)}s ) { # FIXME single result in Croatian
+ $hits = $2;
} else {
diag "get't find results in ", $mech->content;
return;
warn "parse $nr";
$marc = MARC::Record->new;
+ $marc->encoding('utf-8');
$hash = {};
my $html = $mech->content;