feat(rutor): category rutor

This commit is contained in:
Alexey Kasyanchuk
2018-09-02 22:05:39 +03:00
parent 0521b7ea02
commit 429263e61e
2 changed files with 14 additions and 1 deletions

View File

@ -127,11 +127,23 @@ module.exports = class Rutor
if(!topicTitle)
return
let contentCategory
$('#details tr').each(function(i, elem) {
const row = $(this)
const field = row.find('td.header').text()
if(field == 'Категория')
{
contentCategory = row.find('td').next().text().trim()
}
});
return {
name: topicTitle,
poster: $('#details tbody img').attr('src'),
description: $('#details tbody').first().text(),
rutorThreadId: parseInt(id)
rutorThreadId: parseInt(id),
contentCategory
}
}