From 01b59f0a9b588ab21bf7dcf93ffb54002ad0a6b8 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Thu, 12 Mar 2020 02:21:59 +0100 Subject: [PATCH] Changed withReleases boolean to include object in Vixen and Fame Digital scrapers. --- src/scrapers/famedigital.js | 7 +++---- src/scrapers/vixen.js | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/scrapers/famedigital.js b/src/scrapers/famedigital.js index 627e7cec..9698814d 100644 --- a/src/scrapers/famedigital.js +++ b/src/scrapers/famedigital.js @@ -1,6 +1,5 @@ 'use strict'; -const argv = require('../argv'); const { fetchLatest, fetchApiLatest, @@ -89,9 +88,9 @@ async function networkFetchProfile(actorName, scraperSlug, site, include) { const [devils, rocco, peter, silvia] = await Promise.all([ fetchApiProfile(actorName, 'devilsfilm', true), fetchApiProfile(actorName, 'roccosiffredi'), - argv.withReleases ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl, include) : [], - argv.withReleases ? fetchClassicProfile(actorName, 'silviasaint') : [], - argv.withReleases ? fetchClassicProfile(actorName, 'silverstonedvd') : [], + include.scenes ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl, include) : [], + include.scenes ? fetchClassicProfile(actorName, 'silviasaint') : [], + include.scenes ? fetchClassicProfile(actorName, 'silverstonedvd') : [], ]); if (devils || rocco || peter) { diff --git a/src/scrapers/vixen.js b/src/scrapers/vixen.js index dc63b4ab..e36c3f64 100644 --- a/src/scrapers/vixen.js +++ b/src/scrapers/vixen.js @@ -214,14 +214,14 @@ async function fetchScene(url, site, baseRelease) { return res.code; } -async function fetchProfile(actorName, scraperSlug, site, withReleases) { +async function fetchProfile(actorName, scraperSlug, site, include) { const origin = `https://www.${scraperSlug}.com`; const actorSlug = slugify(actorName); const url = `${origin}/api/${actorSlug}`; const res = await get(url); if (res.code === 200) { - return scrapeProfile(res.body.data, origin, withReleases); + return scrapeProfile(res.body.data, origin, include.scenes); } return null;