Updated Jules Jordan profile scraper.
This commit is contained in:
@@ -416,7 +416,7 @@ async function curateProfile(profile, actor) {
|
||||
curatedProfile.hip = Number(profile.hip) || profile.hip?.match?.(/\d+/)?.[0] || null;
|
||||
|
||||
// combined measurement value
|
||||
const measurements = profile.measurements?.match(/(\d+)(\w+)[-x](\d+)[-x](\d+)/); // ExCoGi uses x
|
||||
const measurements = profile.measurements?.match(/(\d+)(\w+)\s*[-x]\s*(\d+)\s*[-x]\s*(\d+)/); // ExCoGi uses x, Jules Jordan has spaces between the dashes
|
||||
|
||||
if (measurements) {
|
||||
curatedProfile.bust = Number(measurements[1]);
|
||||
@@ -610,6 +610,14 @@ async function interpolateProfiles(actorIdsOrNames) {
|
||||
.filter((avatar) => avatar && (avatar.entropy === null || avatar.entropy > 5.5))
|
||||
.sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null;
|
||||
|
||||
if (!profile.avatar_media_id) {
|
||||
// try to settle for low quality avatar
|
||||
profile.avatar_media_id = actorProfiles
|
||||
.map((actorProfile) => actorProfile.avatar)
|
||||
.filter((avatar) => avatar)
|
||||
.sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null;
|
||||
}
|
||||
|
||||
return profile;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user