small adjustments to the scrapers

This commit is contained in:
TheBeastLT
2021-11-11 21:12:14 +01:00
parent 7835ade720
commit 91eac9f8c6
8 changed files with 25 additions and 25 deletions

View File

@@ -72,14 +72,12 @@ function parseTableBody(body) {
$('tr').each((i, element) => {
const row = $(element);
const titleElement = row.find('td a');
try {
if (titleElement.length) {
torrents.push({
title: titleElement.attr('title').trim(),
torrentId: titleElement.attr('href').match(/torrent\/(.*)/)[1],
seeders: parseInt(row.find('span.seed_ok').first().text()),
});
} catch (e) {
console.error('Failed parsing TorrentGalaxy row: ', e);
}
});