##############################################################
# Modules
use WWW::Mechanize;
use JSON::XS;
###########################################################################
# Constants
us
si;
my ($json) = $html =~ m!<script>\s*ws_dl = \[(.*?)\]\s*</script>!si;
#print STDERR "\n# json=[\n$json\n]\n";
if($json) {
$data->{json} = decode_json( $json );
for(qw(author title imprint publication_date format)) {
$data->{$_} = $data->{json}{'gtm-books'}[0]{$_};
}
$data->{binding} ||= $data->{format};
$data->{pubdate} |