Skip to Main Content
Amazon Hacks
book

Amazon Hacks

by Paul Bausch
August 2003
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Amazon Hacks

Sort Your Recommendations by Average Customer Rating

Find the highest rated items among your Amazon product recommendations.

If you’ve taken the time to fine-tune your recommendations [Hack #14], you know how precise they can be. If you’ve also looked at the star rating for some of your favorite products, then you know that the rating can be a good indication of quality. Both the Amazon recommendation and the customer rating add important information to a product, and can help you make a decision about whether to buy one item over another.

To get a feel for the products Amazon recommends for you, you can visit your book recommendations at any time at the following URL:

http://www.amazon.com/o/tg/stores/recs/instant-recs/-/books/0/

In addition to books, you can also find recommendations in other product categories. You can replace books in the URL with any of Amazon’s catalogs, including music, electronics, dvd, and photo.

When you browse to your recommendations, you’ll likely find several pages of items. Wouldn’t it be great if you could add the customer review dimension by sorting the entire list by its average star rating? This hack does exactly that with a bit of screen scraping.

The Code

Because Amazon doesn’t offer sorting by customer rating, this script first gathers all of your Amazon book recommendations into one list. By providing your Amazon account email address and password, the script logs in as you, and then requests the book recommendations page. It continues to request ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

Karen Renaud, Merrill Warkentin, George Westerman
Incident Metrics in SRE

Incident Metrics in SRE

Stepan Davidovic

Publisher Resources

ISBN: 0596005423Supplemental ContentCatalog PageErrata