Deriving transsexual tag from actors in Evil Angel scraper.

This commit is contained in:
2019-10-28 02:12:11 +01:00
parent 0e784a274f
commit f7f5e8a306
2 changed files with 24 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ async function scrapeScene(html, url, site) {
const date = moment.utc($('.updatedDate').first().text(), 'MM-DD-YYYY').toDate();
const actors = data.actor.map(actor => actor.name);
const hasTrans = data.actor.some(actor => actor.gender === 'shemale');
const director = (data.director && data.director[0].name) || (data2.director && data2.director[0].name) || null;
const stars = (data.aggregateRating.ratingValue / data.aggregateRating.bestRating) * 5;
@@ -70,7 +71,11 @@ async function scrapeScene(html, url, site) {
const duration = moment.duration(data.duration.slice(2).split(':')).asSeconds();
const rawTags = data.keywords.split(', ');
const tags = await matchTags(rawTags);
const tags = await matchTags(
hasTrans
? [...rawTags, 'transsexual']
: rawTags,
);
const poster = videoData.picPreview;
const trailer = `${videoData.playerOptions.host}${videoData.url}`;