#1 2007-01-24 00:43:24

tetromino
New member
Registered: 2007-01-24
Posts: 2

Amazon ISBN change

Amazon recently upgraded to ISBN-13, at least for the books that I looked at, and now lists ISBN numbers like this:

ISBN-10: 0123456789
ISBN-13: 123-01234567890

However, GCAmazon.pm searches for "ISBN:", fails to find it, and therefore deletes your ISBN any time you fetch information. Very annoying.

One solution is to change

Code:

elsif ($self->{insideIsbn})
{
    $self->{curInfo}->{isbn} = $origtext;
    $self->{insideIsbn} = 0;
}
[...]
$self->{insideIsbn} = 1 if $origtext =~ /ISBN:/;

to

Code:

elsif ($self->{insideIsbn10})
{
    $self->{curInfo}->{isbn} = $origtext unless $self->{haveIsbn13};
    $self->{insideIsbn10} = 0;
}
elsif ($self->{insideIsbn13})
{
    $self->{curInfo}->{isbn} = $origtext;
    $self->{insideIsbn13} = 0;
    $self->{haveIsbn13} = 1;
}
[...]
$self->{insideIsbn10} = 1 if $origtext =~ /ISBN(-10)?:/;
$self->{insideIsbn13} = 1 if $origtext =~ /ISBN-13:/;

in GCAmazon.pm. (I am assuming that ISBN-13 is preferable over -10.)
I suspect that the changeover to ISBN-13 will very soon also affect all other sources of book information - if it hasn't already.

Offline

 

#2 2007-01-24 12:17:21

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: Amazon ISBN change

Hello,

Thank you very much for this patch. I will add it to the CVS repository ASAP.

Offline

 

#3 2007-01-26 19:26:07

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: Amazon ISBN change

It's on CVS now

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.