From 1cedcae753bd9a099cd8e3b3e5537c824c65c2d2 Mon Sep 17 00:00:00 2001 From: boi12321 Date: Mon, 27 Nov 2023 22:54:05 +0100 Subject: [PATCH] try to fix some of whale member --- src/scrapers/whalemember.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/scrapers/whalemember.js b/src/scrapers/whalemember.js index af5f0fa2..055ebb29 100755 --- a/src/scrapers/whalemember.js +++ b/src/scrapers/whalemember.js @@ -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,