Replaced bhttp with patched fork. Improved Jesse Loads Monster Facials scraper reliability (WIP). Added various tag photos.

This commit is contained in:
DebaucheryLibrarian
2020-10-30 17:37:10 +01:00
parent 4af7597441
commit 39f8c037a5
43 changed files with 128 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
'use strict';
const { get, initAll, formatDate } = require('../utils/qu');
const { get, initAll } = require('../utils/qu');
function scrapeLatest(scenes, dates, site) {
return scenes.map(({ qu }, index) => {
@@ -8,21 +8,23 @@ function scrapeLatest(scenes, dates, site) {
const path = qu.url('a[href*="videos/"]');
if (path) {
release.url = `${site.url}/visitors/${path}`;
if (/\.wmv$/.test(path)) {
release.trailer = `${site.url}/visitors/${path}`;
} else {
release.url = `${site.url}/visitors/${path}`;
}
}
console.log(dates, dates[index], path);
if (dates && dates[index]) {
release.date = dates[index].qu.date(null, 'MM/DD/YYYY');
}
const entryId = path?.match(/videos\/([a-zA-Z0-9]+)(?:_hd)?_trailer/)?.[1]
// release.entryId = release.date ? `${formatDate(release.date, 'YYYY-MM-DD')}-${entryId}` : entryId;
release.entryId = path?.match(/videos\/([a-zA-Z0-9]+)(?:_hd)?_trailer/)?.[1]
|| qu.img('img[src*="graphics/fft"]')?.match(/fft_(\w+).gif/)?.[1];
if (!entryId) {
return null;
}
release.entryId = release.date ? `${formatDate(release.date, 'YYYY-MM-DD')}-${entryId}` : entryId;
release.description = qu.q('tbody tr:nth-child(3) font', true);
const infoLine = qu.q('font[color="#663366"]', true);
@@ -43,7 +45,14 @@ function scrapeScene({ qu }, url, site) {
const release = { url };
const { pathname } = new URL(url);
release.entryId = pathname.match(/videos\/(\w+)_hd_trailer/)[1];
release.entryId = pathname?.match(/videos\/([a-zA-Z0-9]+)(?:_hd)?_trailer/)?.[1];
if (/\.wmv$/.test(pathname)) {
release.trailer = url;
return release;
}
const actor = qu.q('font[color="#990033"] strong', true);
release.actors = [actor];