NAME
WWW::Amazon::Wishlist - grab all the details from your Amazon wishlist
SYNOPSIS
use WWW::Amazon::Wishlist qw(get_list);
my @wishlist;
@wishlist = get_list ($my_amazon_com_id); # gets it from amazon.com
@wishlist = get_list ($my_amazon_com_id, 0); # same, explicitly
@wishlist = get_list ($my_amazon_couk_id, 1); # gets it from amazon.co.uk
# 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
}
DESCRIPTION
Goes to Amazon.(com|co.uk) and scrapes away your wishlist and returns it in a array of hashrefs so that you can fiddle with it until your hearts content.
GETTING YOUR AMAZON ID
The best way to do this is to search for your own wishlist in the search tools.
Searching for mine (simon@twoshortplanks.com) on amazon.com takes me to the URL
http://www.amazon.com/exec/obidos/wishlist/2EAJG83WS7YZM/
there's some more cruft after that last string of numbers and letters but it's the
2EAJG83WS7YZM
bit that's important.
Doing the same for amazon.co.uk is just as easy.
SHOWING YOUR APPRECIATION
There was a thread on london.pm mailing list about working in a vacumn - that it was a bit depressing to keep writing modules but never get any feedback. So, if you use and like this module then please send me an email and make my day.
All it takes is a few little bytes.
Either that or you have the adress of my Amazon Wishlist, it's huge, buy something for me off it :)
BUGS
It doesn't parse other fields from the wishlist such as number wanted, date added, how long to ship and user comment.
I haven't ported my (broken) amazon wishlist totalling script from http://www.twoshortplanks.com/simon/stuff/amazon to use this instead.
I haven't been able to get a multi-paginated wishlist on amazon.co.uk so I can't test that it will go grab more than one page.
It doesn't cope with anything apart from .co.uk and .com yet. Probably.
Lack of testing. It works for the pages I've tried it for but that's no guarantee.
COPYING
Copyright (c) 2001 Simon Wistow
Distributed under the same terms as Perl itself.
This software is under no warranty and will probably destroy your wish list, kill your friends, burn your house and bring about the apocalypse
AUTHOR
Simon Wistow <simon@thegestalt.org>