better crawl.php logging

This commit is contained in:
xfnw 2021-01-08 17:35:14 -05:00
parent 459c295488
commit 3e051c0feb

View file

@ -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]);