Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use GeekTool/curl/perl to watch sale web pages Internet
I frequently watch "one thing at a time" sale pages such as Chainlove for good deals on (in my case) cycling gear. These sites sell only one thing at a time, at fairly steep discounts, until the item is gone, then they move to the next thing. This site provides software to let you know when new things come up for sale, but it's Windows-only. They also provide an RSS feed, which is slow enough that I get notifications about the latest sale just after it's over.

GeekTool/curl/perl to the rescue: The Chainlove site changes the title to the page each time they put something new up. This command uses curl to grab the chainlove.com page and send it to perl, which searches for the title tags and prints out whatever is between those tags:
curl -s www.chainlove.com | perl -nle 'print for m:<title>(.*)</title>:'
I then use GeekTool to run that command once every 10 minutes or so, and print the results to a "windowless window" on my desktop. There are probably better ways of doing this, but this works well. The same snippet of code can be modified to look at any desired webpage, or part of a webpage other than the title tag if so desired.
    •    
  • Currently 2.00 / 5
  You rated: 1 / 5 (9 votes cast)
 
[13,257 views]  

Use GeekTool/curl/perl to watch sale web pages | 7 comments | Create New Account
Click here to return to the 'Use GeekTool/curl/perl to watch sale web pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use GeekTool/curl/perl to watch sale web pages
Authored by: ianf on Oct 28, '08 08:36:50AM
I guess you could adapt this hint to use Growl Notifications instead.

One of the extras bundled with Growl is called Growl Notify (needs to be installed seperately from the Growl DMG file: http://growl.info/extras.php#growlnotify), so something along the lines of;
growlnotify -s -m <output of the curl/perl command>
I've not actually tried this, but should work in principal.

[ Reply to This | # ]
Use GeekTool/curl/perl to watch sale web pages
Authored by: hofbauer on Oct 28, '08 11:31:38AM
Have you checked out the Firefox Extension "Update Scanner"?
https://addons.mozilla.org/en-US/firefox/addon/3362

[ Reply to This | # ]
Use GeekTool/curl/perl to watch sale web pages
Authored by: Dejal on Oct 28, '08 12:56:05PM
Another option that might be easier is Dejal Simon, a utility to monitor websites and other servers for changes and failures. It enables you to monitor just a part of the page, to ignore banners or other irrelevant parts. Check it out.

[ Reply to This | # ]
OmniWeb
Authored by: moxieboy on Nov 03, '08 02:50:02PM

For what it's worth, OmniWeb can check bookmarked pages for changes as well.



[ Reply to This | # ]
Use GeekTool/curl/perl to watch sale web pages
Authored by: Cobalt Jacket on Oct 28, '08 09:03:12PM

A real geek would use a cron job instead of a GUI tool such as GeekTool.



[ Reply to This | # ]
use urlwatch instead
Authored by: macubergeek on Oct 29, '08 02:39:52AM
http://freshmeat.net/projects/urlwatch

this script checks for any change in a web page.
launch it with a conditional cronjob ie:

The below cronjob should be all on one line:
*/10 * * * 1-5 /Users/jamesk/scripts/urlwatch-1.3/watch.py > /tmp/foo.out && if /bin/test -s /tmp/foo.out; then /usr/bin/mail -s Alert! myemail@whatever.com < /tmp/shmoocon.out;fi

This requires that you enable postfix under Leopard using MailServe to be able to get the email alerts.

[ Reply to This | # ]
corrected cron job
Authored by: macubergeek on Oct 29, '08 03:07:03AM

*/10 * * * 1-5 /Users/jamesk/scripts/urlwatch-1.3/watch.py > /tmp/foo.out && if /bin/test -s /tmp/foo.out; then /usr/bin/mail -s Alert! myemail@whatever.com < /tmp/foo.out;fi



[ Reply to This | # ]