Improved media handling, added trailer support. Fetching media from Vixen network frontpages.

This commit is contained in:
2019-09-25 04:52:58 +02:00
parent b12d74cbb3
commit 96d8cfbcb6
10 changed files with 141 additions and 51 deletions

View File

@@ -18,6 +18,7 @@ function scrapeLatest(html, site) {
const shootId = href.split('/')[2];
const title = sceneLinkElement.text().trim();
const poster = $(element).find('.adimage').attr('src');
const photos = $(element).find('.rollover .roll-image').map((photoIndex, photoElement) => $(photoElement).attr('data-imagesrc')).toArray();
const date = moment.utc($(element).find('.date').text(), 'MMM DD, YYYY').toDate();
@@ -36,6 +37,7 @@ function scrapeLatest(html, site) {
actors,
date,
photos,
poster,
rating: {
stars,
},
@@ -86,13 +88,10 @@ async function scrapeScene(html, url, shootId, ratingRes, site) {
actors,
description,
photos,
poster: trailerPoster,
trailer: {
video: {
default: trailerVideo,
sd: trailerVideo,
hd: trailerVideo.replace('480p', '720p'),
},
poster: trailerPoster,
src: trailerVideo,
quality: 480,
},
rating: {
stars,