log: toloka

This commit is contained in:
ner committed 2024-10-25 22:14:57 +03:00
1 parent 5e9e7cb6a8
commit 335e26aa76
1 file changed
+6 -2
+6 -2
View File
@@ -27,7 +27,10 @@ export class Toloka {
const html = parse(data);
const rows = html?.querySelectorAll('.prow1, .prow2');
return rows?.map((row) => {
console.log(data);
return rows?.length
? (rows?.map((row) => {
const originalTitle = row.querySelector('td:nth-child(3)')?.innerText;
const size = row.querySelector('td:nth-child(7)')?.innerText;
const seeders = row.querySelector('td:nth-child(10)')?.innerText;
@@ -51,7 +54,8 @@ export class Toloka {
magnet: '',
download
};
}) as Torrent[];
}) as Torrent[])
: data;
});
}