]> 91.132.146.200 Git - aranea.git/commitdiff
typos and code cleanup
authorBanana <mail@bananas-playground.net>
Sun, 8 May 2022 09:59:12 +0000 (11:59 +0200)
committerBanana <mail@bananas-playground.net>
Sun, 8 May 2022 09:59:12 +0000 (11:59 +0200)
cleanup.pl
fetch.pl

index eee4432b7df0afb8a6440d6574e1029c2997cc48..ba7a47bd338ba84a80cccb893650a53e32ad7108 100644 (file)
@@ -107,7 +107,7 @@ foreach my $baseUrl (@toBeDeletedFromFetchAgain) {
        $query->finish();
        sayLog "Removed $baseUrl from url_to_fetch" if $DEBUG;
 }
-sayGreen "Remove baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
+sayGreen "Removed baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
 
 # remove failed fetches
 sayYellow "Remove fetch_failed";
@@ -120,7 +120,7 @@ sayYellow "Remove invalid urls which the is_uri check does let pass";
 $queryStr = "DELETE FROM unique_domain WHERE `url` NOT LIKE '%.%'";
 $query = $dbh->prepare($queryStr);
 $query->execute();
-$queryStr = "SELECT * FROM `url_to_fetch` WHERE `baseurl` LIKE '% %'";
+$queryStr = "DELETE FROM `url_to_fetch` WHERE `baseurl` LIKE '% %'";
 $query = $dbh->prepare($queryStr);
 $query->execute();
 sayYellow "Remove invalid urls done";
index 663fd8640083246b362be1a8c85c9c5ee22faa89..de347f62aaa7aa06b91e996b1bb5e3e0dcaa9401 100644 (file)
--- a/fetch.pl
+++ b/fetch.pl
@@ -82,7 +82,7 @@ while ( my ($id, $url) = each %urlsToFetch ) {
                        push(@urlsFailed, $id);
                        next;
                }
-               open(my $fh, '>', "storage/$id.result") or die "Could not open file 'storage/$id.result' $!";           
+               open(my $fh, '>', "storage/$id.result") or die "Could not open file 'storage/$id.result' $!";
                print $fh $res->decoded_content();
                close($fh);
                push(@urlsFetched, $id);