View Source:
AmazonWishListTextBackup
Note:
This page has been locked and cannot be edited.
*Update:* this page previously contained a python script based almost entirely on something [written by Jon Udell|http://blog.jonudell.net/2008/10/25/pyaws-fermats-last-theorem-and-search-diversity/]. However as of October 2009 Amazon requires you to use your secret key for REST queries so that code no longer works. Luckily, the perl [Net::Amazon|http://search.cpan.org/~boumenot/Net-Amazon-0.59/lib/Net/Amazon.pm] module has just been updated to work with the new Amazon requirements. With a very small amount of tweaking of an example form that module I was able to once again create a script which dumps my wishlist as a text file. You still need to supply your wishlist ID from your wishlist URL on the Amazon website. You also need to provide both your AWS access key and your secret key, both of which are available for free at the [AWS website|http://aws.amazon.com/]. You will also need to install the ~Net::~Amazon module from CPAN. Once again this is a terrible, terrible script. Note that Amazon returns results in fixed 'pages' of 10, so you have to supply a number of total pages ahead of time. ~Net::~Amazon does one query per second to comply with Amazon rules so this can take a while. I have about 650 wishlist items so I just set the number or pages to 100 for a maximum of 1000 results (and a fixed script runtime of 100 seconds). {{{ #!/usr/bin/perl -w use Net::Amazon; use Net::Amazon::Request::Wishlist; my $ua = Net::Amazon->new( token => 'your aws key', secret_key => 'your aws secret', max_pages => 100 ); my $req = Net::Amazon::Request::Wishlist->new( id => 'your wishlist id' ); # Response is of type Net::Amazon::ASIN::Response my $resp = $ua->request($req); if($resp->is_success()) { print $resp->as_string, "\n"; } else { print $resp->message(), "\n"; } }}}
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
No changes found
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In