Fix recommendations

This commit is contained in:
Felix Ableitner 2022-04-08 12:50:11 +02:00
parent 5973f70ba1
commit 0003856e20

View file

@ -13,7 +13,8 @@ fs.mkdirSync(outDir, { recursive: true });
// Write the stats file // Write the stats file
try { try {
const stats = JSON.parse(fs.readFileSync(statsFile, "utf8")); const stats = JSON.parse(fs.readFileSync(statsFile, "utf8"));
const recommended_domains = fs.readFileSync(recommendationsFile, "utf8").split(','); const recommended_domains = fs.readFileSync(recommendationsFile, "utf8").trim().split(',');
console.log(recommended_domains);
const recommended = stats.instance_details.filter(i => const recommended = stats.instance_details.filter(i =>
recommended_domains.includes(i.domain) recommended_domains.includes(i.domain)
); );