From d360854a6df1dab6984d4714e3d4e1780e452b81 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 7 Feb 2026 18:02:04 +0100 Subject: [PATCH] Excluded location from In The Crack scene actor data. --- src/scrapers/inthecrack.js | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/scrapers/inthecrack.js b/src/scrapers/inthecrack.js index df6e9ebb..cd4b7235 100755 --- a/src/scrapers/inthecrack.js +++ b/src/scrapers/inthecrack.js @@ -4,7 +4,7 @@ const unprint = require('unprint'); const slugify = require('../utils/slugify'); -function scrapeProfile(model, channel) { +function scrapeProfile(model, channel, isProfile = false) { const profile = {}; profile.name = model.name; // used by shallow scrape @@ -12,22 +12,6 @@ function scrapeProfile(model, channel) { profile.dateOfBirth = unprint.extractDate(model.birthdate, 'YYYY-MM-DD'); - profile.birthPlace = model.countries?.map((country) => { - if (country.name) { - return country.name; - } - - if (country.isO2 || country.iso2) { // sic - return country.isO2 || country.iso2; - } - - if (typeof country === 'string') { - return country; - } - - return null; - }).filter(Boolean)[0]; - profile.height = model.height; profile.weight = model.weight; @@ -41,6 +25,25 @@ function scrapeProfile(model, channel) { profile.url = `${channel.origin}/modelcollections/${model.id}`; } + if (isProfile) { + // exclude from scene actor data, as this will trigger a metric ton of untimely location lookups + profile.birthPlace = model.countries?.map((country) => { + if (country.name) { + return country.name; + } + + if (country.isO2 || country.iso2) { // sic + return country.isO2 || country.iso2; + } + + if (typeof country === 'string') { + return country; + } + + return null; + }).filter(Boolean)[0]; + } + return profile; } @@ -235,7 +238,7 @@ async function fetchProfile(actor, channel) { const res = await unprint.get(`https://api.inthecrack.com/Model/${modelId}`); if (res.ok) { - return scrapeProfile(res.data, channel); + return scrapeProfile(res.data, channel, true); } return null;