forked from DebaucheryLibrarian/traxxx
Enabled pagination on network page.
This commit is contained in:
@@ -59,16 +59,17 @@ function scrapeScene(html, url, site) {
|
||||
const originalUrl = `${protocol}//${hostname}${pathname}`;
|
||||
|
||||
const entryId = originalUrl.split('-').slice(-1)[0];
|
||||
const title = sceneElement.find('h1.scene-title.grey-text').text();
|
||||
const title = sceneElement.find('h1.scene-title').text();
|
||||
const description = sceneElement.find('.synopsis').contents().slice(2).text().replace(/[\s\n]+/g, ' ').trim();
|
||||
|
||||
const date = moment.utc(sceneElement.find('span.entry-date').text(), 'MMM D, YYYY').toDate();
|
||||
const actors = $('a.scene-title.grey-text.link').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
const date = moment.utc(sceneElement.find('span.entry-date').text()?.match(/\w+ \d{1,2}, \d{4}/), 'MMM D, YYYY').toDate();
|
||||
const actors = $('.performer-list a, h1 a.scene-title').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
|
||||
const duration = Number(sceneElement.find('.duration-ratings .duration').text().slice(10, -4)) * 60;
|
||||
|
||||
const poster = `https:${$('video, dl8-video').attr('poster')}`;
|
||||
const photos = $('.contain-scene-images.desktop-only a').map((index, el) => `https:${$(el).attr('href')}`).toArray();
|
||||
const posterPath = $('video, dl8-video').attr('poster') || $('img.start-card').attr('src');
|
||||
const poster = posterPath && `https:${posterPath}`;
|
||||
const photos = $('.contain-scene-images.desktop-only a').map((index, el) => $(el).attr('href')).toArray().filter(Boolean).map(photo => `https:${photo}`);
|
||||
|
||||
const trailerEl = $('source');
|
||||
const trailerSrc = trailerEl.attr('src');
|
||||
@@ -90,10 +91,10 @@ function scrapeScene(html, url, site) {
|
||||
tags,
|
||||
photos,
|
||||
poster,
|
||||
trailer: {
|
||||
trailer: trailerSrc ? {
|
||||
src: trailerSrc,
|
||||
type: trailerType,
|
||||
},
|
||||
} : null,
|
||||
rating: null,
|
||||
site,
|
||||
channel,
|
||||
|
||||
Reference in New Issue
Block a user