wowoa
:回复 user_login :let myblok=document.getElementsByClassName(\"myblok\")
let result = {};
for (blok of myblok){
let regex=/几率 (\\d+)%/i;
let matches=blok.innerText.match(regex)
if (matches){
let prob=matches[1]
regex = /回帖 (.+?) ([+-])(\\d+)/gi;
matches = blok.innerText.matchAll(regex);
for (let match of matches) {
let score=prob/100*parseInt(match[2]+match[3])
if (result[match[1]]) {
result[match[1]]=Number((result[match[1]]+score).toFixed(2));
} else {
result[match[1]]=score;
}
}
}
}
console.log(JSON.stringify(result))