tl; dr: I am using the Amazon product advertising API with Python. How can I search for keywords for a book and get XML results containing TITLE, ISBN, and PRICE for each record?
Extended version:
I work in Python on a website that allows the user to search for tutorials from different sites such as eBay and Amazon. Basically, I need to get simple information such as headers, ISBNS, and prices for each item from a set of search results from one of these sites. Then I can store and format this information as necessary in my application (for example, display HTML).
In the eBay case, getting the information I needed was not too difficult. I used urllib2 to make a request based on the sample I found. All I need is a special security key to add to the url:
def ebaySearch(keywords):
... Then I made it out with the mini-house.
In the case of Amazon, this does not look so simple. I thought I would start by just finding lightweight packaging. But their developer's site doesn't seem to provide a python shell for what interests me (product advertising API). The one I tried, python-amazon-product-api 0.2.5 from https://pypi.python.org/pypi/python-amazon-product-api/ , gave me some installation problems that may not be worth the time take a look at (but maybe I'm just pissed off ..). I also looked around and found pyaws and pyecs, but they seem to use legacy authentication mechanisms.
Then I decided that I would just try to create URLs from scratch, as was the case with eBay. But Amazon requires a timestamp in the URLs, which I suppose I could build programmatically (maybe something like these people who go the whole 9 yards with a signature: https://forums.aws.amazon.com/ thread.jspa? threadID = 10048 ).
Even if it worked (I doubt it will happen, given the number of disappointments provided by logistics so far), the bottom line is that I want a name, price, and ISBN for the books I'm looking for. I was able to create a sample tutorial URL on the API website, and then see the XML result, which does indeed contain headers and ISBNs. But no price! G! After some desperate Google search, a minor URL modification (adding & ResponseGroup = Offers and & MerchantID = All) did the trick, but there were no names then. (I think one more question I would have, where can I find the index of the possible ResponseGroup parameters?)
In general, as you can see, I really do not have a reliable methodology for this. Is a build-a-ur approach the right way, or will it be more of a problem than it's worth it? Maybe tl; dr above is a better view of the general question.