Keep an eye on prices of web shop products (python-pricewatch)

Sometimes I want to watch the price development of a product in different online web shops over some time. My intention is to compare prices and to find a point in time where the product gets cheaper and therefore more interesting to buy

That’s why I have written a small Python script whichs runs periodically on my server. It iterates over all defined products I want to keep an eye on and informs me via e-mail of a price development. As of the time of writing, 3 German providers are supported (Saturn, Media Markt and But the script can easily be modified and expanded.

In the case of Saturn and Media Markt, the online product page of the web shop is queried and the price is extracted from the HTML response. Thanks to the Python package Beautiful Soup, HTML parsing is very easy. (and probably other Amazon regions) makes it somewhat more difficult. You cannot query the page using the above mentioned approach because of Amazon’s robot detection. Instead you have to sign up for their (free) Product Advertising API. Then you get an also free AWS account with an access and a secret key. These keys can be used in my pricewatch script to query Amazon’s products. Also thanks to a python package (python-amazon-simple-product-api), handling the API is simple, too.

More details, the usage and the source code are available as usual in my GitHub repository.

Enjoy. 😉

By André Heßling

I am an electronic engineer living in Voerde, Germany.

Leave a comment

Your email address will not be published. Required fields are marked *