WWW::Scraper::ISBN::AmazonFR_Driver - Search driver for the (FR) Amazon online catalog.
See parent class documentation (WWW::Scraper::ISBN::Driver)
Searches for book information from the (FR) Amazon online catalog. This module is a mere paste and translation of WWW::Scraper::ISBN::AmazonUS_Driver. The main (only?) difference is in the parsing of the result. Here it is done with simple regexp, whereas in AmazonUS_Driver it was done using Template::Extract.
Creates a query string, then passes the appropriate form fields to the Amazon (FR) server.
The returned page should be the correct catalog page for that ISBN. If not the function returns zero and allows the next driver in the chain to have a go. If a valid page is returned, the following fields are returned via the book hash:
isbn author title book_link thumb_link image_link pubdate publisher
The book_link, thumb_link and image_link refer back to the Amazon (FR) website.
search() set the attribute
handler of the object it returns. Several cases are possible :
Error loading amazon.fr form web page (unreachable?)
Error parsing amazon.fr form
Error about form submission (form changed?)
Could not extract data from amazon.fr result page
The following message can appear on STDERR (up to 2 times by request?) from time to time
Malformed UTF-8 character (unexpected end of string) in subroutine entry at (/some/path/to/the/module)/HTML/PullParser.pm line 83
This doesn't prevent
search() from completing its job and this doesn't seems to be deterministic.
$mechanize->get( SEARCH ) (1 message) and
$mechanize->submit() (2 messages) in
search() seams to be responsible for this. So, I am tempted to blame amazon, but I didn't checked.
Requires the following modules be installed:
Fabien GALAND, <email@example.com>
This is a mere paste and translation of WWW::Scraper::ISBN::AmazonUS_Driver written by Barbie, <firstname.lastname@example.org>.
Copyright (C) 2007 Fabien Galand All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.