DEV Community


Posted on


Monitor Amazon Price Changes

This article demonstrates how to use the web site monitor to check a product's price on Amazon periodically and send email when price changes.

Amazon Page Info

Let's pick an Amazon Kindle as an example. The shopping URL is
  • Use Chrome browser to open the URL. Right click on the price area and select "Inspect" menu.

Alt Text

The HTML source is shown below:
Alt Text

So we can look for a "td" node with "id" being "priceblock_ourprice_lbl", and its text node value is "Price:", and the real price is in the subsequent "span" node with "id" being "priceblock_ourprice".

Configure SMTP server

SMTP server needs to be configured first for sending email on alarm

  1. Select "Setting/SMTP Server" menu:

  2. Enter SMTP server parameters. We use gmail as an example:

Then press "Send Test Mail" to check if the SMTP server has been configured successfully.

Configure SysUpTime

  • Add a web site monitor:

    Alt Text

    In the URL field, enter
  • Press "Configure" button next to the "Threshold settings". Alt Text

Move "body response time" to the left and move "content match" to the right panel.

  • Configure it to use simple content match, and choose "Line contains" radio button, enter.

to the text field of "Line contains". In the token field, enter "2".
The value is the second token of the line.
Alt Text

  • In the threshold field, enter 340, so that an alarm will be raised when price drops below 340. Alt Text

Press "Ok" buttons to go back to the screen at step 1.

  • In the following screen Alt Text

Press "Configure" button next to the "Actions"

  • Enter your email address to receive email notification when price drops below threshold:

    Alt Text

  • Press "Ok" buttons to save the monitor.

  • (Optional) In the "Manage Monitor" dialog, select the newly created monitor and press "Chart" button to see the real time chart.
    Alt Text

Top comments (0)