diff --git a/src/scrapers/famedigital.js b/src/scrapers/famedigital.js index e08765c6..cf96abad 100644 --- a/src/scrapers/famedigital.js +++ b/src/scrapers/famedigital.js @@ -1,5 +1,6 @@ 'use strict'; +const argv = require('../argv'); const { fetchLatest, fetchApiLatest, fetchUpcoming, fetchApiUpcoming, fetchScene, fetchProfile, fetchApiProfile } = require('./gamma'); function extractLowArtActors(release) { @@ -42,12 +43,16 @@ async function networkFetchUpcoming(site, page = 1) { return fetchUpcoming(site, page); } +function getActorReleasesUrl(actorPath, page = 1) { + return `https://www.peternorth.com/en/videos/All-Categories/0${actorPath}/All-Dvds/0/latest/${page}`; +} + async function networkFetchProfile(actorName) { // not all Fame Digital sites offer Gamma actors const [devils, rocco, peter] = await Promise.all([ fetchApiProfile(actorName, 'devilsfilm', true), fetchApiProfile(actorName, 'roccosiffredi'), - fetchProfile(actorName, 'peternorth', true), + argv.withReleases ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl) : [], ]); if (devils || rocco || peter) {