forked from DebaucheryLibrarian/traxxx
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 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) {
|
||||
delete rawScrapedRelease.query; // some scrapers pass the qu-wrapped window instance to parent scrapers, filling up memory
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
const { fetchApiLatest, fetchApiUpcoming, fetchScene, fetchApiProfile } = require('./gamma');
|
||||
const { fetchApiLatest, fetchApiUpcoming, fetchSceneApi, fetchApiProfile } = require('./gamma');
|
||||
|
||||
function curateRelease(release, site) {
|
||||
if (['bubblegumdungeon', 'ladygonzo'].includes(site.slug)) {
|
||||
return {
|
||||
...release,
|
||||
title: release.title.split(/:|\|/)[1].trim(),
|
||||
title: release.title.split(/:|\|/)[1]?.trim(),
|
||||
};
|
||||
}
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
async function networkFetchScene(url, site, release) {
|
||||
const scene = await fetchScene(url, site, release);
|
||||
async function networkFetchScene(url, site, release, options) {
|
||||
const scene = await fetchSceneApi(url, site, release, options);
|
||||
|
||||
return curateRelease(scene, site);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue