better crawl.php logging
This commit is contained in:
parent
459c295488
commit
3e051c0feb
1 changed files with 2 additions and 3 deletions
|
@ -28,7 +28,7 @@ $arg = $argv;
|
||||||
array_shift($arg);
|
array_shift($arg);
|
||||||
|
|
||||||
foreach ($arg as $url) {
|
foreach ($arg as $url) {
|
||||||
echo "\n\n";
|
echo "\n";
|
||||||
$url = preg_replace('/\/$/','',$url);
|
$url = preg_replace('/\/$/','',$url);
|
||||||
echo $url."\n";
|
echo $url."\n";
|
||||||
$file = file_get_contents($url);
|
$file = file_get_contents($url);
|
||||||
|
@ -41,8 +41,7 @@ foreach ($arg as $url) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $title;
|
echo "title: ".$title."\n";
|
||||||
echo $document;
|
|
||||||
|
|
||||||
$stmt = $db->prepare('DELETE FROM indexed WHERE url = ?');
|
$stmt = $db->prepare('DELETE FROM indexed WHERE url = ?');
|
||||||
$stmt->execute([$url]);
|
$stmt->execute([$url]);
|
||||||
|
|
Loading…
Reference in a new issue