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);
foreach ($arg as $url) {
echo "\n\n";
echo "\n";
$url = preg_replace('/\/$/','',$url);
echo $url."\n";
$file = file_get_contents($url);
@ -41,8 +41,7 @@ foreach ($arg as $url) {
continue;
}
echo $title;
echo $document;
echo "title: ".$title."\n";
$stmt = $db->prepare('DELETE FROM indexed WHERE url = ?');
$stmt->execute([$url]);