This commit is contained in:
biglyderv 2025-01-30 08:34:59 -05:00
parent d3e31661c5
commit 503db43c4e
2 changed files with 5 additions and 6 deletions

View file

@ -13,7 +13,7 @@ function rankCalc(result, iterations = 10) {
matrixe[unn][unn] = 1; matrixe[unn][unn] = 1;
frs[unn] = result[unn].followers; frs[unn] = result[unn].followers;
fng[unn] = result[unn].following; fng[unn] = result[unn].following;
fnc[unn] = Object.keys(frs[unn]).length; fnc[unn] = Object.keys(fng[unn]).length;
pr[unn] = 1; pr[unn] = 1;
} }
@ -51,11 +51,10 @@ function rankCalc(result, iterations = 10) {
for (let unb in result) { for (let unb in result) {
let prb = prold[unb]; let prb = prold[unb];
if (prb < 1 / 1e9 || fnc[unb] == 0) { matrixe[una][unb] = 0.03;
matrixe[una][unb] = matrixf[una][unb]; if (prb < 1 / 1e12 || fnc[unb] == 0) {
continue; continue;
} }
matrixe[una][unb] = 0.03;
for (let unc in result) { for (let unc in result) {
matrixe[una][unb] += matrixf[una][unc] * matrixf[unc][unb]; matrixe[una][unb] += matrixf[una][unc] * matrixf[unc][unb];

View file

@ -6,10 +6,10 @@ let cache = {};
async function siteCollector(user, path) { async function siteCollector(user, path) {
let users = []; let users = [];
let i = 0; let i = 1;
while (true) { while (true) {
let p = `https://api.darflen.com/users/${user}/${path}/${i}`; let p = `https://api.darflen.com/users/${user}/${path}/${i}`;
let j1 = cache[p] let j1 = cache[p];
if (!j1) { if (!j1) {
let h1 = await fetch(p); let h1 = await fetch(p);
j1 = await h1.json(); j1 = await h1.json();