The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

I have a need for a simple search script

LizardLizard Registered User regular
I want a bot that can repeatedly refresh a specific URL until it detects a specific text phrase, at which point it beeps (preferable), flashes, or otherwise alerts me.

So if for instance there's a thread about breakfast food, I can leave it refreshing every few seconds/minutes until someone later mentions delicious waffles, at which point I hear the beep while in the kitchen eating waffles and rush in to quote him and say "OMG I LUV WAFFLES!!!1 BLUEBERY OR STRWBERY?!?"

Naturally, the real application will be considerably more practical, but the concept is the same.

It seems like an awfully simple concept but I can't for the life of me figure what I'm looking for. Any help?

Lizard on

Posts

  • JaninJanin Registered User regular
    edited April 2008
    What OS, programs, and libraries do you have installed/are willing to install? If you are willing to install Python, it's easy. If you use UNIX/Linux/Mac and have curl or wget, you could write a shell script. I don't know if Windows comes with any built-in application for downloading a web page, but if it does you could use batch files or something.

    Janin on
    [SIGPIC][/SIGPIC]
  • LizardLizard Registered User regular
    edited April 2008
    Sorry, Windows. I'm open to adding additional junk.

    If there's a really good Linux solution I have a Knoppix CD I could run off of when I'm doing this.

    I was hoping for something like a FireFox plugin.

    Lizard on
  • LizardLizard Registered User regular
    edited May 2008
    So someone suggested Greasemonkey, and gave me this code

    #!/bin/sh
    secs=30
    UA="some user agent that isn't a known robot"

    while [ "" == "$(wget --user-agent="$UA" --quiet "$1" -O- | grep "$2")" ] ; do
    sleep $secs
    done

    # some kind of alert here
    mpg321 alert.mp3

    But apparently I'm more of a retard that I suspected because I haven't the slightest clue how to set it up.

    Lizard on
  • JaninJanin Registered User regular
    edited May 2008
    Well, that's not a Greasemonkey script, that's a UNIX shell script.

    Janin on
    [SIGPIC][/SIGPIC]
  • LizardLizard Registered User regular
    edited May 2008
    I'm sorry for my ignorance here, I was hoping it was something simple like some obscure shareware macro program.

    My only experience with bots is watching "Robocop" 27 times.

    Lizard on
Sign In or Register to comment.