diff --git a/rank.js b/rank.js index 8a618f3..172145c 100644 --- a/rank.js +++ b/rank.js @@ -13,7 +13,7 @@ function rankCalc(result, iterations = 10) { matrixe[unn][unn] = 1; frs[unn] = result[unn].followers; fng[unn] = result[unn].following; - fnc[unn] = Object.keys(frs[unn]).length; + fnc[unn] = Object.keys(fng[unn]).length; pr[unn] = 1; } @@ -51,11 +51,10 @@ function rankCalc(result, iterations = 10) { for (let unb in result) { let prb = prold[unb]; - if (prb < 1 / 1e9 || fnc[unb] == 0) { - matrixe[una][unb] = matrixf[una][unb]; + matrixe[una][unb] = 0.03; + if (prb < 1 / 1e12 || fnc[unb] == 0) { continue; } - matrixe[una][unb] = 0.03; for (let unc in result) { matrixe[una][unb] += matrixf[una][unc] * matrixf[unc][unb]; diff --git a/site.js b/site.js index 9c387be..6f5c19b 100644 --- a/site.js +++ b/site.js @@ -6,10 +6,10 @@ let cache = {}; async function siteCollector(user, path) { let users = []; - let i = 0; + let i = 1; while (true) { let p = `https://api.darflen.com/users/${user}/${path}/${i}`; - let j1 = cache[p] + let j1 = cache[p]; if (!j1) { let h1 = await fetch(p); j1 = await h1.json();