Fixed ExploitedX not matching some age fields.
This commit is contained in:
@@ -81,7 +81,7 @@ function scrapeProfile({ query }, _entity) {
|
||||
|
||||
const bio = Object.fromEntries(keys.map((key, index) => [slugify(key, '_'), values[index]]));
|
||||
|
||||
profile.age = Number(bio.age) || null;
|
||||
profile.age = unprint.extractNumber(bio.age);
|
||||
profile.height = convert(bio.height, 'cm');
|
||||
profile.measurements = bio.measurements;
|
||||
|
||||
|
||||
@@ -91,11 +91,13 @@ function scrapeProfile({ query }, { url }) {
|
||||
profile.description = [query.content('.model-bio-text, #performer-description'), bio.funfact].filter(Boolean).join(' ');
|
||||
profile.aliases = bio.alias?.split(/[,\n]/).map((alias) => alias.trim());
|
||||
|
||||
profile.age = parseInt(bio.age, 10) || null;
|
||||
profile.age = unprint.extractNumber(bio.age);
|
||||
profile.dateOfBirth = unprint.extractDate(bio.age, 'MM/DD/YYYY');
|
||||
profile.measurements = bio.measurements;
|
||||
profile.height = Number(bio.height?.match(/(\d+)\s*cm/)?.[1]) || convert(bio.height, 'cm');
|
||||
|
||||
console.log(profile);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user