$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";
$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";
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);