Compare commits

..

No commits in common. "1cedcae753bd9a099cd8e3b3e5537c824c65c2d2" and "master" have entirely different histories.

1 changed files with 15 additions and 4 deletions

View File

@ -58,13 +58,24 @@ function scrapeScene(html, site, url) {
const { document } = new JSDOM(html).window;
const release = { site };
const scene = document.querySelector('#t2019-2col');
release.url = url;
release.title = document.querySelector('.scene-info .text-2xl').textContent.trim();
release.description = document.querySelector('.scene-info .space-x-4 span').textContent.trim();
release.actors = Array.from(document.querySelectorAll('.scene-info .link-list-with-commas a'), (el) => el.textContent);
release.title = scene.querySelector('.t2019-stitle').textContent.trim();
release.description = scene.querySelector('#t2019-description').textContent.trim();
release.actors = Array.from(scene.querySelectorAll('#t2019-models a'), (el) => el.textContent);
const durationEls = Array.from(scene.querySelectorAll('#t2019-stime span'));
if (durationEls.length > 1) {
release.date = moment.utc(durationEls[0].textContent, 'MMMM DD, YYYY').toDate();
release.duration = Number(durationEls[1].textContent.match(/\d+/)[0]) * 60;
} else {
release.duration = Number(durationEls[0].textContent.match(/\d+/)[0]) * 60;
}
// unreliable CDN
release.photos = Array.from(scene.querySelectorAll('.lg:hidden img'), (el) => ({
release.photos = Array.from(scene.querySelectorAll('#t2019-main .t2019-thumbs img'), (el) => ({
src: (/^http/.test(el.src) ? el.src : `https:${el.src}`),
referer: site.url,
attempts: 5,