From: Banana Date: Sun, 8 May 2022 09:59:12 +0000 (+0200) Subject: typos and code cleanup X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=738bae354b6316ef07ea080639bc7585ccde8c1f;p=aranea.git typos and code cleanup --- diff --git a/cleanup.pl b/cleanup.pl index eee4432..ba7a47b 100644 --- a/cleanup.pl +++ b/cleanup.pl @@ -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"; diff --git a/fetch.pl b/fetch.pl index 663fd86..de347f6 100644 --- 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);