Excluded location from In The Crack scene actor data.

This commit is contained in:
DebaucheryLibrarian
2026-02-07 18:02:04 +01:00
parent 786ef491ac
commit d360854a6d

View File

@@ -4,7 +4,7 @@ const unprint = require('unprint');
const slugify = require('../utils/slugify'); const slugify = require('../utils/slugify');
function scrapeProfile(model, channel) { function scrapeProfile(model, channel, isProfile = false) {
const profile = {}; const profile = {};
profile.name = model.name; // used by shallow scrape profile.name = model.name; // used by shallow scrape
@@ -12,6 +12,21 @@ function scrapeProfile(model, channel) {
profile.dateOfBirth = unprint.extractDate(model.birthdate, 'YYYY-MM-DD'); profile.dateOfBirth = unprint.extractDate(model.birthdate, 'YYYY-MM-DD');
profile.height = model.height;
profile.weight = model.weight;
const ethnicity = model.ethnicity?.title || model.ethnicity;
if (!/none/i.test(ethnicity)) {
profile.ethnicity = ethnicity;
}
if (model.id) {
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) => { profile.birthPlace = model.countries?.map((country) => {
if (country.name) { if (country.name) {
return country.name; return country.name;
@@ -27,18 +42,6 @@ function scrapeProfile(model, channel) {
return null; return null;
}).filter(Boolean)[0]; }).filter(Boolean)[0];
profile.height = model.height;
profile.weight = model.weight;
const ethnicity = model.ethnicity?.title || model.ethnicity;
if (!/none/i.test(ethnicity)) {
profile.ethnicity = ethnicity;
}
if (model.id) {
profile.url = `${channel.origin}/modelcollections/${model.id}`;
} }
return profile; return profile;
@@ -235,7 +238,7 @@ async function fetchProfile(actor, channel) {
const res = await unprint.get(`https://api.inthecrack.com/Model/${modelId}`); const res = await unprint.get(`https://api.inthecrack.com/Model/${modelId}`);
if (res.ok) { if (res.ok) {
return scrapeProfile(res.data, channel); return scrapeProfile(res.data, channel, true);
} }
return null; return null;