From 52f66e7982cbb682be8c925f1fa89e9a73614d05 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 24 Aug 2020 18:24:07 +0200 Subject: [PATCH] Fixed undefined location in FreeOnes scraper. --- src/scrapers/freeones.js | 4 +++- src/scrapers/mindgeek.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scrapers/freeones.js b/src/scrapers/freeones.js index 576ba20e..c84dfe71 100644 --- a/src/scrapers/freeones.js +++ b/src/scrapers/freeones.js @@ -37,7 +37,9 @@ function scrapeProfile(html, actorName) { if (bio.dateOfBirth) profile.birthdate = moment.utc(bio.dateOfBirth, 'YYYY-MM-DD').toDate(); - if (profile.placeOfBirth || bio.country) profile.birthPlace = `${bio.placeOfBirth}, ${bio.country}`; + if (profile.placeOfBirth && bio.country) profile.birthPlace = `${bio.placeOfBirth}, ${bio.country}`; + else if (bio.country) profile.birthPlace = bio.country; + profile.eyes = bio.eyeColor; profile.hair = bio.hairColor; profile.ethnicity = bio.ethnicity; diff --git a/src/scrapers/mindgeek.js b/src/scrapers/mindgeek.js index a88644e0..4becb564 100644 --- a/src/scrapers/mindgeek.js +++ b/src/scrapers/mindgeek.js @@ -241,10 +241,12 @@ async function fetchUpcoming(site) { return null; } -async function fetchScene(url, site) { +async function fetchScene(url, site, baseScene) { const entryId = url.match(/\d+/)[0]; const { session, instanceToken } = await getSession(url); + console.log(baseScene); + const res = await session.get(`https://site-api.project1service.com/v2/releases/${entryId}`, { headers: { Instance: instanceToken,