I need to do some cleaning stuff when my crawler has finished all the links to crawl.
First I tried to override getProcessReport, but I may not call this function at all, as all my information gathered will reside in a database.
How can I do this?
You seem to have CSS turned off. Please don't fill out this field.
Anonymous
Hi!
The go() method just returns when everything is finished, so just do all you cleanup stuff right after the go()-method in your scipt.
Hi!! How you know that the method go has finished successfully?. if the method go() does not return any value.
Like this:
... $crawler->go();
$Report = $crawler->getProcessReport();
if ($Report->abort_reason == PHPCrawlerAbortReasons::ABORTREASON_PASSEDTHROUGH) { echo 'Everything done"; }
Take a look at the documentation of the PHPCrawlerAbortReasons-constants for further information: http://phpcrawl.cuab.de/classreferences/PHPCrawlerAbortReasons/overview.html
Hi!!!
Thanks a lot for your support.
Glad i could help!
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
I need to do some cleaning stuff when my crawler has finished all the links to crawl.
First I tried to override getProcessReport, but I may not call this function at all, as all my information gathered will reside in a database.
How can I do this?
Last edit: Anonymous 2013-11-19
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi!
The go() method just returns when everything is finished, so just do all you cleanup stuff right after the go()-method in your scipt.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi!!
How you know that the method go has finished successfully?. if the method go() does not return any value.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Like this:
...
$crawler->go();
$Report = $crawler->getProcessReport();
if ($Report->abort_reason == PHPCrawlerAbortReasons::ABORTREASON_PASSEDTHROUGH)
{
echo 'Everything done";
}
Take a look at the documentation of the PHPCrawlerAbortReasons-constants for further information:
http://phpcrawl.cuab.de/classreferences/PHPCrawlerAbortReasons/overview.html
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi!!!
Thanks a lot for your support.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Glad i could help!