diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-08-30 21:37:50 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-08-30 21:37:50 +0200 |
| commit | 9d97bab663adb122d6edf7c15639a3457e94c71f (patch) | |
| tree | 8707945846bb4acd7df59cc5c47a3b7736c64444 /src/phinde | |
| parent | 083fa4116b22f4898123006880fb52061763513d (diff) | |
| download | phinde-9d97bab663adb122d6edf7c15639a3457e94c71f.tar.gz phinde-9d97bab663adb122d6edf7c15639a3457e94c71f.zip | |
tell why crawler stops
Diffstat (limited to 'src/phinde')
| -rw-r--r-- | src/phinde/Crawler.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/phinde/Crawler.php b/src/phinde/Crawler.php index 72726a5..1cf9bdc 100644 --- a/src/phinde/Crawler.php +++ b/src/phinde/Crawler.php @@ -56,6 +56,7 @@ class Crawler $res = $req->send(); if ($res->getStatus() === 304) { //not modified since last time, so don't crawl again + $this->log('Not modified since last fetch'); return false; } else if ($res->getStatus() !== 200) { throw new \Exception( @@ -141,5 +142,10 @@ class Crawler { $this->showLinksOnly = $showLinksOnly; } + + protected function log($msg) + { + echo $msg . "\n"; + } } ?> |
