Improved Aziani profile scraper for Cosplayground, allowing image type override, added profile test for Cosplayground.

This commit is contained in:
DebaucheryLibrarian
2026-07-24 16:57:15 +02:00
parent 327f255c9d
commit 8f0609ade2
3 changed files with 12 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ function scrapeScene(data, channel, parameters) {
.map((key) => unprint.prefixUrl(`${poster[key][0].fileuri}?${poster[key][0].signature}`, parameters.cdn));
}
release.caps = data.content
release[parameters.imageType || 'caps'] = data.content
?.filter((item) => item.content_type === 'image' && item.content?.[0])
.map((item) => [
item.content[0],
@@ -187,7 +187,10 @@ function scrapeProfile(data, entity, parameters) {
profile.gender = bio.gender?.toLowerCase();
profile.age = bio.age;
profile.dateOfBirth = unprint.extractDate(`${bio.born} 0`, 'MMMM Do YYYY', { match: /\w+ \d+\w{2} \d{1,4}/ });
profile.dateOfBirth = unprint.extractDate(`${bio.born} 0`, 'MMMM Do YYYY', { match: /\w+ \d+\w{2} \d{1,4}/ })
|| unprint.extractDate(bio.date_of_birth, 'yyyy-MM-dd');
profile.birthPlace = bio.birthplace;
profile.ethnicity = bio.ethnicity;
profile.measurements = bio.measurements;
@@ -210,16 +213,18 @@ function scrapeProfile(data, entity, parameters) {
};
}
profile.socials = [bio.onlyfans, bio.instagram].filter(Boolean);
return profile;
}
async function fetchProfile({ name, url }, { entity, parameters }) {
if (!url) {
// no easy search option
if (!url && !parameters.entryIdSlug) {
// no easy search option and numeric ID is non-derivable
return null;
}
const actorId = new URL(url).pathname.match(/models?\/(\d+)/)?.[1];
const actorId = url && new URL(url).pathname.match(/models?\/(\d+)/)?.[1];
if (!actorId && !parameters.entryIdSlug) {
return null;