This commit is contained in:
biglyderv 2025-01-31 21:01:57 -05:00
parent 7b4f2b8f91
commit 7a126c4b10

View file

@ -16,7 +16,9 @@ async function urlCollector(url, path, file, useLimit) {
try {
data = await fetch(url);
data = await data.text();
console.log(`User ${url} was fetched`);
} catch (err) {
console.log(`User ${url} did not fetch`);
return [];
}
@ -24,6 +26,7 @@ async function urlCollector(url, path, file, useLimit) {
let links = body('a');
let urls = [];
links.each(function(i, link) {
console.log(`User ${url} has ${i} pages calculated`);
if (useLimit && urls.length >= pageLimit * 40) return;
let h = body(link).attr('href');