time to look at pyAmazon

Posted by paul on October 30, 2002

Another one of Mark Pilgrim’s little gems. Creating links for the Amazon affiliate program is tedious since you can’t look up the item from the “build a link” page. You have locate the item, get its ID, then login and create the HTML. What a pain.

I’m thinking that, given a title, pyAmazon can run the query and return the properly formatted link.

And it works.

>>>import amazon
>>>amazon.setLicense('get your own')
>>>pythonBooks = amazon.searchByKeyword('Python')
>>>pythonBooks[0].ProductName
u’Perl How to Program, Introducing CGI and Python (With CD-ROM)’
>>>pythonBooks[0].Asin
u’0130284181′

so now to just write a wrapper for this so I can pass it a title and have it return the ASIN with all the other stuff around it.

Thanks, Mark. Again.

Trackbacks

Trackbacks are closed.

Amazon Honor System Click Here to Pay Learn More
Comments

Comments are closed.