Fixed Adult Time scraper.
This commit is contained in:
parent
bd5babd37e
commit
3d349c413f
|
@ -130,7 +130,7 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') {
|
||||||
? await fetchScene(layoutScraper, baseRelease.url, entity, baseRelease, options)
|
? await fetchScene(layoutScraper, baseRelease.url, entity, baseRelease, options)
|
||||||
: await fetchMovie(layoutScraper, baseRelease.url, entity, baseRelease, options);
|
: await fetchMovie(layoutScraper, baseRelease.url, entity, baseRelease, options);
|
||||||
|
|
||||||
const pathname = new URL(baseRelease.url).pathname.replace(/\//g, '_');
|
const pathname = baseRelease.path || (baseRelease.url && new URL(baseRelease.url).pathname.replace(/\//g, '_'));
|
||||||
|
|
||||||
if (rawScrapedRelease) {
|
if (rawScrapedRelease) {
|
||||||
delete rawScrapedRelease.query; // some scrapers pass the qu-wrapped window instance to parent scrapers, filling up memory
|
delete rawScrapedRelease.query; // some scrapers pass the qu-wrapped window instance to parent scrapers, filling up memory
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const { fetchApiLatest, fetchApiUpcoming, fetchScene, fetchApiProfile } = require('./gamma');
|
const { fetchApiLatest, fetchApiUpcoming, fetchSceneApi, fetchApiProfile } = require('./gamma');
|
||||||
|
|
||||||
function curateRelease(release, site) {
|
function curateRelease(release, site) {
|
||||||
if (['bubblegumdungeon', 'ladygonzo'].includes(site.slug)) {
|
if (['bubblegumdungeon', 'ladygonzo'].includes(site.slug)) {
|
||||||
return {
|
return {
|
||||||
...release,
|
...release,
|
||||||
title: release.title.split(/:|\|/)[1].trim(),
|
title: release.title.split(/:|\|/)[1]?.trim(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return release;
|
return release;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function networkFetchScene(url, site, release) {
|
async function networkFetchScene(url, site, release, options) {
|
||||||
const scene = await fetchScene(url, site, release);
|
const scene = await fetchSceneApi(url, site, release, options);
|
||||||
|
|
||||||
return curateRelease(scene, site);
|
return curateRelease(scene, site);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue