Fabien GALAND > WWW-Scraper-ISBN-AmazonFR_Driver > WWW::Scraper::ISBN::AmazonFR_Driver

Download:
WWW-Scraper-ISBN-AmazonFR_Driver-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

WWW::Scraper::ISBN::AmazonFR_Driver - Search driver for the (FR) Amazon online catalog.

SYNOPSIS ^

See parent class documentation (WWW::Scraper::ISBN::Driver)

DESCRIPTION ^

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.

METHODS ^

search()

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.

DIAGNOSTICS ^

search() set the attribute handler of the object it returns. Several cases are possible :

Impossibility to reach Amazon.fr
  Error loading amazon.fr form web page (unreachable?)
Wrong web page or possible changes in Amazon designed
  Error parsing amazon.fr form
Lost connection to Amazon or possible changes in Amazon designed
  Error about form submission (form changed?)
Error in parsing the answer of Amazon (my mistake?)
  Could not extract data from amazon.fr result page

BUGS and LIMITATIONS ^

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.

The calls $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 ^

Requires the following modules be installed:

WWW::Scraper::ISBN::Driver
WWW::Mechanize

SEE ALSO ^

WWW::Scraper::ISBN
WWW::Scraper::ISBN::Record
WWW::Scraper::ISBN::Driver

AUTHOR ^

Fabien GALAND, <galand@cpan.org>

CREDIT ^

This is a mere paste and translation of WWW::Scraper::ISBN::AmazonUS_Driver written by Barbie, <barbie@cpan.org>.

COPYRIGHT ^

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.

syntax highlighting: