retrieve wishlist from Amazon

P

Patrick Flaherty

Hi,

Would like to use Perl to retrive my wishlist periodically from Amazon.

Checked CPAN and there's actually a module to do this: WWW::Amazon::Wishlist

Written by someone in the UK so I had to modify it slightly. Did so and tried
but then realized that it wasn't logging into my account (maybe this didn't
exist in 2001 when the script was first written).

So either I'm overlooking something in the code (I don't think so) or some https
stuff needs to be added.

Explaining further, here's the text of what I mailed the author. No repsonse so
I'm posting it here which is probably what I should have done in the first
place:
 
B

Bob Walton

Patrick Flaherty wrote:

....
Would like to use Perl to retrive my wishlist periodically from Amazon.

Checked CPAN and there's actually a module to do this: WWW::Amazon::Wishlist

Written by someone in the UK so I had to modify it slightly. Did so and tried
but then realized that it wasn't logging into my account (maybe this didn't
exist in 2001 when the script was first written).
....


You picked the wrong bit for your wish list ID. It is the string that
has the mixed numbers and cap letters that you want. And no, you don't
need to log in to look at someone's wish list. And, I didn't have to
modify WWW::Amazon::Wishlist.pm (version 0.9).

The following, for example, gets my wish list, although not very nicely
formatted:

use WWW::Amazon::Wishlist qw(get_list);
my @wishlist;
$my_amazon_com_id='3YBOF9YU9Q1E';
@wishlist = get_list ($my_amazon_com_id); # gets it from amazon.com
# the elements of @wishlist are hashrefs that contain ...
foreach my $book (@wishlist)
{
print $book->{title}, # the, err, title
$book->{author}, # and the author(s)
$book->{asin}, # the asin number, its unique id on Amazon
$book->{price},# how much it will set you back
$book->{type}; # Hardcover/Paperback/CD/DVD etc
}

....

....
 
B

Bob Walton

Patrick Flaherty wrote:

....
However this leads to the observation (error) that author is no longer parsed
correctly (maybe Amazon has changed how this is laid out). Do you see author
appearing correctly in the output?


Actually, now that I look at it, the author is not printing out OK for
me (but neither of my two entries actually have an author -- one is a
DVD and the other a disc-cleaning kit, both from a couple of years ago,
the first and last time I looked at Amazon's wish list). It looks like
I get what is probably a key for an author entry in a database table
instead. It's not surprising that things like this would change from
time to time.
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,186
Latest member
vinaykumar_nevatia

Latest Threads

Top