I am using something similar for myself, to try and find a new apartment. There is this site for my town that posts available apartments, and you can then apply for them at this site. Apartments are extremely rare here in Gothenburg, and usually the one that gets first application (with good enough credentials) gets the apartment. Given this, and the fact that new entries are not even every day sometimes, you would need to sit and refresh your browser 24/7 to even have a shot at it without extreme luck.

Anyhow, my script runs in the background and polls the page at regular intervals (with my preferred search options) for changes, and if there are any, it fires up a browser with the page in question so I can see if it seems interesting and then apply. Just like yours do.

I have this running here on my comp while I am working.

I have one "significant" extra, and that is a few regexps that strips everything but the apt list from the HTML before comparing, due ot the fact that otherwise dynamics like different ads or such could affect the size comparison. This is probably not necessary for many pages, not even sure if it is for the one I am polling. :)

What all those words are trying to say is that yes, there is a use for such a script. :)

As for improvements, well, I guess it could be more configurable - maybe even put it in a module on its own, so you could just say something like:

check_site( url => $url, interval => 1800, process => \&clean_page, etc => 'more options', );
Well, you get the idea. In that case, I guess it should also fork/thread, so you could poll several sites at the same time.

Not if I know if there would be a great demand for such a module, but hey - if nothing else, it may be fun to write. :)

There are rumours that cattle prods may have at least a limited effect on the behaviour of users... :)


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

In reply to Re: Simple LWP Exercise by Dog and Pony
in thread Simple LWP Exercise by bilfurd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.