Wget or cURL code for checking changes to a web page?
Does anyone know what command i could use to check and be notified of any price changes on a product/web page such as http://www.amazon.com/Tales-Beedle-B.../dp/0545128285. If the price changes to say $7.50 i need it to check and notify me.
Wget or cURL seem the best but don't know where to start with what command to use. Any help much appreciated. |
You could do it with wget but it would be a little involved.
If it were me I'd do it with lynx instead: Code:
lynx -dump http://www.amazon.com/Tales-Beedle-B.../dp/0545128285 |grep " Price:" |awk '{print $1,$2}' In my awk I'm printing both the "Price:" and the current price ($7.14 when I ran it). You could just print the current price ($2 in awk print statement) and strip off the $ to do numeric comparison using something like bc -l. Code:
lynx -dump http://www.amazon.com/Tales-Beedle-B.../dp/0545128285 |grep " Price:" |awk '{print $2}' |cut -c2- |
Quick and nasty:
Code:
#!/usr/bin/env python |
All times are GMT -5. The time now is 12:09 AM. |