stop on empty next_marc
[Biblio-Z3950.git] / Aleph.pm
index ef9470e..3f6eabe 100644 (file)
--- a/Aleph.pm
+++ b/Aleph.pm
@@ -50,15 +50,15 @@ sub diag {
 # WYR - Godina izdavanja
 
 sub usemap {{
-       4               => 'WTI',
-       7               => 'ISBN',
-       8               => 'ISSN',
-       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;
@@ -70,7 +70,7 @@ sub search {
 
        $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";
@@ -143,6 +143,7 @@ sub next_marc {
 warn "parse $nr";
 
                $marc = MARC::Record->new;
+               $marc->encoding('utf-8');
                $hash = {};
 
                my $html = $mech->content;