From b9e4764516a0e5c10a27c570c2a0e9f4fd7df004 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Fri, 15 Jan 2021 16:14:48 +0100 Subject: [PATCH] Fixed Pascals Sub Sluts interpreting metric as imperial height, filtering unlikely in interpolation. Splitting double actor entries in Top Web Models. --- src/actors.js | 3 ++- src/scrapers/pascalssubsluts.js | 2 +- src/scrapers/topwebmodels.js | 16 ++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/actors.js b/src/actors.js index f495d19b3..9d2a1a47f 100644 --- a/src/actors.js +++ b/src/actors.js @@ -504,7 +504,6 @@ async function interpolateProfiles(actorIdsOrNames) { 'penis_girth', 'circumcised', 'natural_boobs', - 'height', 'hair_color', 'eyes', 'has_tattoos', @@ -519,6 +518,8 @@ async function interpolateProfiles(actorIdsOrNames) { ...mostFrequentValues, }; + profile.height = getMostFrequent(valuesByProperty.height.filter(height => height > 50 && height < 300)); // remove unlikely values + profile.date_of_birth = getMostFrequentDate(valuesByProperty.date_of_birth); profile.date_of_death = getMostFrequentDate(valuesByProperty.date_of_death); profile.age = getHighest(valuesByProperty.age); diff --git a/src/scrapers/pascalssubsluts.js b/src/scrapers/pascalssubsluts.js index f97473ae0..4f9848db1 100644 --- a/src/scrapers/pascalssubsluts.js +++ b/src/scrapers/pascalssubsluts.js @@ -63,7 +63,7 @@ function scrapeProfile({ query }) { profile.gender = 'female'; profile.nationality = bio.nationality; - profile.height = feetInchesToCm(bio.height); + profile.height = /cm/.test(bio.height) ? parseInt(bio.height, 10) : feetInchesToCm(bio.height); profile.age = bio.age; profile.hairColor = bio.hair; diff --git a/src/scrapers/topwebmodels.js b/src/scrapers/topwebmodels.js index 35d965e9d..10382f3e0 100644 --- a/src/scrapers/topwebmodels.js +++ b/src/scrapers/topwebmodels.js @@ -16,12 +16,16 @@ function scrapeSceneX(scene) { release.duration = qu.durationToSeconds(scene.videos_duration); release.date = new Date(scene.release_date); - release.actors = scene.models.map(actor => ({ - name: actor.name, - gender: actor.gender || null, - avatar: actor.thumb, - url: `https://tour.topwebmodels.com/models/${actor.id}/${slugify(actor.name)}`, - })); + release.actors = scene.models + .map(actor => (/&/.test(actor.name) + ? actor.name.split(/\s*&\s*/) + : { + name: actor.name, + gender: actor.gender || null, + avatar: actor.thumb, + url: `https://tour.topwebmodels.com/models/${actor.id}/${slugify(actor.name)}`, + })) + .flat(); release.stars = scene.rating; release.tags = scene.tags.map(tag => tag.name);