Pārlūkot izejas kodu

typos and code cleanup

Banana 2 gadi atpakaļ
vecāks
revīzija
738bae354b
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 2 2
      cleanup.pl
  2. 1 1
      fetch.pl

+ 2 - 2
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";

+ 1 - 1
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);