From 11681c8bd6f6f41656973ec8a3248e57428a1944 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Fri, 31 Jan 2025 22:29:41 -0500 Subject: [PATCH] fix ome funnies --- site.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/site.js b/site.js index ea15d66..1fcbf25 100644 --- a/site.js +++ b/site.js @@ -48,15 +48,16 @@ async function urlCollector(url, path, file, useLimit, data2) { console.log(`User ${url} has ${urls.length} pages calculated`); }) - let h3; try { h3 = new URL(new URL(url).origin); } catch (err) { - return [...new Set(urls)]; + } urls.push(h3.toString()) - + if (!data2[url]) data2[url] = {following: [], followers: []}; + data2[url][path] = urls; + return [...new Set(urls)]; } @@ -172,18 +173,16 @@ async function siteCollector(user, path, site, useLimit, dat) { } data[u] = { followers: [], following: [] }; p.push(async function (k) { - let j1 = await siteCollector(u, 'followers', site, true, data); + await siteCollector(u, 'followers', site, true, data); - data[u].followers = j1; console.log(`User ${u} followers fully calculated`); p[k] = 'hi'; }(p.length)); p.push(async function (k) { - let j1 = await siteCollector(u, 'following', site,true, data); + await siteCollector(u, 'following', site,true, data); - data[u].following = j1; console.log(`User ${u} following fully calculated`); p[k] = 'hi';