fix
This commit is contained in:
parent
d3e31661c5
commit
503db43c4e
2 changed files with 5 additions and 6 deletions
7
rank.js
7
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];
|
||||
|
|
4
site.js
4
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();
|
||||
|
|
Loading…
Reference in a new issue