git.cweiske.de
/
phinde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
083fa41
)
tell why crawler stops
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 30 Aug 2016 19:37:50 +0000
(21:37 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 30 Aug 2016 19:37:50 +0000
(21:37 +0200)
src/phinde/Crawler.php
patch
|
blob
|
history
diff --git
a/src/phinde/Crawler.php
b/src/phinde/Crawler.php
index 72726a5a950fb808ac7c0019f2306c07cc42c855..1cf9bdc95680e0344b2a33177ebacc106eb538f7 100644
(file)
--- 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
$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(
return false;
} else if ($res->getStatus() !== 200) {
throw new \Exception(
@@
-141,5
+142,10
@@
class Crawler
{
$this->showLinksOnly = $showLinksOnly;
}
{
$this->showLinksOnly = $showLinksOnly;
}
+
+ protected function log($msg)
+ {
+ echo $msg . "\n";
+ }
}
?>
}
?>