Changed withReleases boolean to include object in Vixen and Fame Digital scrapers.
This commit is contained in:
parent
370605554b
commit
01b59f0a9b
|
@ -1,6 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const argv = require('../argv');
|
|
||||||
const {
|
const {
|
||||||
fetchLatest,
|
fetchLatest,
|
||||||
fetchApiLatest,
|
fetchApiLatest,
|
||||||
|
@ -89,9 +88,9 @@ async function networkFetchProfile(actorName, scraperSlug, site, include) {
|
||||||
const [devils, rocco, peter, silvia] = await Promise.all([
|
const [devils, rocco, peter, silvia] = await Promise.all([
|
||||||
fetchApiProfile(actorName, 'devilsfilm', true),
|
fetchApiProfile(actorName, 'devilsfilm', true),
|
||||||
fetchApiProfile(actorName, 'roccosiffredi'),
|
fetchApiProfile(actorName, 'roccosiffredi'),
|
||||||
argv.withReleases ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl, include) : [],
|
include.scenes ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl, include) : [],
|
||||||
argv.withReleases ? fetchClassicProfile(actorName, 'silviasaint') : [],
|
include.scenes ? fetchClassicProfile(actorName, 'silviasaint') : [],
|
||||||
argv.withReleases ? fetchClassicProfile(actorName, 'silverstonedvd') : [],
|
include.scenes ? fetchClassicProfile(actorName, 'silverstonedvd') : [],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (devils || rocco || peter) {
|
if (devils || rocco || peter) {
|
||||||
|
|
|
@ -214,14 +214,14 @@ async function fetchScene(url, site, baseRelease) {
|
||||||
return res.code;
|
return res.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchProfile(actorName, scraperSlug, site, withReleases) {
|
async function fetchProfile(actorName, scraperSlug, site, include) {
|
||||||
const origin = `https://www.${scraperSlug}.com`;
|
const origin = `https://www.${scraperSlug}.com`;
|
||||||
const actorSlug = slugify(actorName);
|
const actorSlug = slugify(actorName);
|
||||||
const url = `${origin}/api/${actorSlug}`;
|
const url = `${origin}/api/${actorSlug}`;
|
||||||
const res = await get(url);
|
const res = await get(url);
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
return scrapeProfile(res.body.data, origin, withReleases);
|
return scrapeProfile(res.body.data, origin, include.scenes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue