Using grid layout with thumbnails.
This commit is contained in:
@@ -18,6 +18,8 @@ function scrapeLatest(html, site) {
|
||||
const shootId = href.split('/')[2];
|
||||
const title = sceneLinkElement.text().trim();
|
||||
|
||||
const thumbnails = $(element).find('.rollover .roll-image').map((thumbnailIndex, thumbnailElement) => $(thumbnailElement).attr('data-imagesrc')).toArray();
|
||||
|
||||
const date = moment.utc($(element).find('.date').text(), 'MMM DD, YYYY').toDate();
|
||||
const actors = $(element).find('.shoot-thumb-models a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
const stars = $(element).find('.average-rating').attr('data-rating') / 10;
|
||||
@@ -33,6 +35,7 @@ function scrapeLatest(html, site) {
|
||||
title,
|
||||
actors,
|
||||
date,
|
||||
thumbnails,
|
||||
rating: {
|
||||
stars,
|
||||
},
|
||||
@@ -49,6 +52,10 @@ async function scrapeScene(html, url, shootId, ratingRes, site) {
|
||||
const title = $('h1.shoot-title span.favorite-button').attr('data-title');
|
||||
const actorsRaw = $('.shoot-info p.starring');
|
||||
|
||||
const thumbnails = $('.gallery .thumb img').map((thumbnailIndex, thumbnailElement) => `https://cdnp.kink.com${$(thumbnailElement).attr('data-image-file')}`).toArray();
|
||||
const trailerVideo = $('.player span[data-type="trailer-src"]').attr('data-url');
|
||||
const trailerPoster = $('.player video#kink-player').attr('poster');
|
||||
|
||||
const date = moment.utc($(actorsRaw)
|
||||
.prev()
|
||||
.text()
|
||||
@@ -78,6 +85,15 @@ async function scrapeScene(html, url, shootId, ratingRes, site) {
|
||||
date,
|
||||
actors,
|
||||
description,
|
||||
thumbnails,
|
||||
trailer: {
|
||||
video: {
|
||||
default: trailerVideo,
|
||||
sd: trailerVideo,
|
||||
hd: trailerVideo.replace('480p', '720p'),
|
||||
},
|
||||
poster: trailerPoster,
|
||||
},
|
||||
rating: {
|
||||
stars,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user