try to fix some of whale member #61
|
@ -58,24 +58,13 @@ function scrapeScene(html, site, url) {
|
||||||
const { document } = new JSDOM(html).window;
|
const { document } = new JSDOM(html).window;
|
||||||
const release = { site };
|
const release = { site };
|
||||||
|
|
||||||
const scene = document.querySelector('#t2019-2col');
|
|
||||||
|
|
||||||
release.url = url;
|
release.url = url;
|
||||||
release.title = scene.querySelector('.t2019-stitle').textContent.trim();
|
release.title = document.querySelector('.scene-info .text-2xl').textContent.trim();
|
||||||
release.description = scene.querySelector('#t2019-description').textContent.trim();
|
release.description = document.querySelector('.scene-info .space-x-4 span').textContent.trim();
|
||||||
release.actors = Array.from(scene.querySelectorAll('#t2019-models a'), (el) => el.textContent);
|
release.actors = Array.from(document.querySelectorAll('.scene-info .link-list-with-commas 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
|
// 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}`),
|
src: (/^http/.test(el.src) ? el.src : `https:${el.src}`),
|
||||||
referer: site.url,
|
referer: site.url,
|
||||||
attempts: 5,
|
attempts: 5,
|
||||||
|
|
Loading…
Reference in New Issue