try to fix some of whale member #61

Open
boiii wants to merge 3 commits from boiii/traxxx:whalemember into master
1 changed files with 4 additions and 15 deletions
Showing only changes of commit 1cedcae753 - Show all commits

View File

@ -58,24 +58,13 @@ 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 = 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;
}
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);
// unreliable CDN
release.photos = Array.from(scene.querySelectorAll('#t2019-main .t2019-thumbs img'), (el) => ({
release.photos = Array.from(scene.querySelectorAll('.lg:hidden img'), (el) => ({
src: (/^http/.test(el.src) ? el.src : `https:${el.src}`),
referer: site.url,
attempts: 5,