Skip to main content.
home | support | download

Back to List Archive

Re: Knowing whether ended normally?

From: Bill Moseley <moseley(at)>
Date: Tue Jun 01 2004 - 18:46:02 GMT
On Tue, Jun 01, 2004 at 11:18:56AM -0700, Justin Tang wrote:
> Hi:
>   I'm modifying to look for certain content in a site, and made a
> function to set $_[1]->abort++ if found.  Is there anyway to know if the
> spider was ended normally(not aborted) at the end of the spidering cycle? So
> I know whether or not the target content was found.  Thanks!

No, there's nothing in that would indicate it.  Messages go to
STDOUT so you could capture that output.  Or you could do this in your

    if ( $found ) {
        system('touch spider.aborted');
        system("echo 'spider aborted' | mail -s 'Spider Aborted' $pager_num");
        system("aumix -v100; mpg123 siren.ogg&");

Remember, the config file is just perl code -- you can make it do anything.

Bill Moseley
Received on Tue Jun 1 11:46:02 2004