fix(rutracker): rutracker id feat

This commit is contained in:
Alexey Kasyanchuk 2018-08-15 12:48:27 +03:00
parent 7cf5c17fe4
commit 1d76939e26
2 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ module.exports = class Rutracker
name: topicTitle,
poster: $('.post_body .postImgAligned').attr('title'),
description: $('.post_body').text(),
rutrackerThreadId: parseInt($('a.magnet-link').attr('data-topic_id')),
}
}
}

View File

@ -19,5 +19,6 @@ describe("rutracker", () => {
const data = await rutracker.parse()
assert.equal(data.name, '(Doom metal / Melodic metal / Instrumental) Folie A Deux - Demo - 2012, MP3, 128-320 kbps')
assert.equal(data.poster, 'http://i44.fastpic.ru/big/2012/1018/a2/4e8740f608387b32b74c5deea72d05a2.jpg')
assert.equal(data.rutrackerThreadId, 4220109)
})
});