forked from DebaucheryLibrarian/traxxx
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';
|
||||
|
||||
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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue