Skip to content

{ Daily Archives } Wednesday, April 2016

Amazon Wish List Hack on github

I've put an Amazon Wishlist Widget for WordPress on my github site, that uses the techniques described before. You can see it running on the sidebar here.

Getting multiple pages in the Amazon Wish List

I figured out how to get all the pages from screen-scraping the Amazon wish list. Basically, look for the "Next" button (it's in a <li class=a-last> element). If that element is present, look for the next page. function getwishlistitems ($listID, $page=1){ // ignore parsing warnings $wishlistdom = new DOMDocument(); @$wishlistdom->loadHTMLFile("http://www.amazon.com/gp/registry/wishlist/$listID?disableNav=1&page=$page"); $wishlistxpath = new DOMXPath ($wishlistdom); […]