新宿区立図書館調査

#!/usr/bin/perl
use strict;
use warnings;
use utf8;

use Web::Scraper;
use YAML;
use URI;

print Dump scraper {
  process '//table[tr/th]/tr[2]', info => scraper {
    process '//td[2]/font/a', href => '@href';
    process '//td[6]', umu => 'text';
  };
}->scrape(URI->new(
  'http://www.library.shinjuku.tokyo.jp/opac/cgi-bin/sellist?' .
  'type=0&allc=&page=1&keyword=&sentaku=or&title=&sentaku=or&' .
  'author=&sentaku=or&publish=&sentaku=or&isbn=4-87311-325-3&' .
  'pubydate1=&pubydate3=&bunrui=&syubetu=all&kan=all&media=all&count=1'));
[hetappi@lily work]$ perl ./shinjuku.pl 
---
info:
  href: !!perl/scalar:URI::http http://www.library.shinjuku.tokyo.jp/opac/cgi-bin/detail?
    biblioid=0004140424&type=0&count=1&before=
  umu: 貸出中
[hetappi@lily work]$ 

ISBN10、13、ハイフン有り無し可、リクエスト1回、EUC、GET 可、not well-formed。