fix(1337x): proper poster in some cases

This commit is contained in:
Alexey Kasyanchuk
2019-01-26 15:27:53 +03:00
parent eb5f7a7f41
commit db3c6faab2
2 changed files with 12 additions and 1 deletions

View File

@ -47,9 +47,13 @@ module.exports = class Stragegie
contentCategory = $('.torrent-category-detail .list li').first().find('span').text()
} catch(er) {}
let poster = $('.torrent-image img').attr('src') || $('#description img').attr('data-original');
if(poster)
poster = poster.replace(/^\/\//, 'https://');
return {
name: topicTitle.trim(),
poster: $('#description img').attr('data-original'),
poster,
description: $('#description').text(),
x1337ThreadId: parseInt(this.id),
x1337Href: this.href,