log: toloka
This commit is contained in:
1 parent
5e9e7cb6a8
commit
335e26aa76
1 file changed
+27
-23
+27
-23
@@ -27,31 +27,35 @@ export class Toloka {
|
|||||||
const html = parse(data);
|
const html = parse(data);
|
||||||
const rows = html?.querySelectorAll('.prow1, .prow2');
|
const rows = html?.querySelectorAll('.prow1, .prow2');
|
||||||
|
|
||||||
return rows?.map((row) => {
|
console.log(data);
|
||||||
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;
|
|
||||||
const download = row.querySelector('td:nth-child(6) a')?.getAttribute('href');
|
|
||||||
|
|
||||||
const { year, source, codec, container, title, season, episode, resolution } = torrentTitle.parse(
|
return rows?.length
|
||||||
originalTitle || ''
|
? (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;
|
||||||
|
const download = row.querySelector('td:nth-child(6) a')?.getAttribute('href');
|
||||||
|
|
||||||
return {
|
const { year, source, codec, container, title, season, episode, resolution } = torrentTitle.parse(
|
||||||
year,
|
originalTitle || ''
|
||||||
source,
|
);
|
||||||
codec,
|
|
||||||
container,
|
return {
|
||||||
originalTitle,
|
year,
|
||||||
title: `${title}${season && episode ? ` [S${season}:E${episode}]` : ''}`,
|
source,
|
||||||
id: originalTitle,
|
codec,
|
||||||
size,
|
container,
|
||||||
seeders: parseInt(seeders || '0'),
|
originalTitle,
|
||||||
quality: resolution,
|
title: `${title}${season && episode ? ` [S${season}:E${episode}]` : ''}`,
|
||||||
magnet: '',
|
id: originalTitle,
|
||||||
download
|
size,
|
||||||
};
|
seeders: parseInt(seeders || '0'),
|
||||||
}) as Torrent[];
|
quality: resolution,
|
||||||
|
magnet: '',
|
||||||
|
download
|
||||||
|
};
|
||||||
|
}) as Torrent[])
|
||||||
|
: data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user