From 738bae354b6316ef07ea080639bc7585ccde8c1f Mon Sep 17 00:00:00 2001 From: Banana Date: Sun, 8 May 2022 11:59:12 +0200 Subject: [PATCH] typos and code cleanup --- cleanup.pl | 4 ++-- fetch.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5