Added Aylo and MindGeek profile tests, updated site configuration.
This commit is contained in:
@@ -624,7 +624,7 @@ async function scrapeProfile({ query }, url, actorName, _siteSlug, getActorRelea
|
||||
|
||||
profile.description = query.cnt('.actorBio p:not(.bioTitle)');
|
||||
|
||||
if (hair) profile.hair = hair.split(':')[1].trim();
|
||||
if (hair) profile.hairColor = hair.split(':')[1].trim();
|
||||
if (height) profile.height = Number(height.match(/\d+/)[0]);
|
||||
if (weight) profile.weight = Number(weight.match(/\d+/)[0]);
|
||||
if (alias) profile.aliases = alias.split(':')[1].trim().split(', ');
|
||||
@@ -648,7 +648,7 @@ function scrapeApiProfile(data, releases, siteSlug) {
|
||||
|
||||
if (data.attributes.ethnicity) profile.ethnicity = data.attributes.ethnicity;
|
||||
if (data.attributes.eye_color) profile.eyes = data.attributes.eye_color;
|
||||
if (data.attributes.hair_color) profile.hair = data.attributes.hair_color;
|
||||
if (data.attributes.hair_color) profile.hairColor = data.attributes.hair_color;
|
||||
|
||||
const avatarPaths = Object.values(data.pictures).reverse();
|
||||
if (avatarPaths.length > 0) profile.avatar = avatarPaths.map((avatarPath) => `https://images01-evilangel.gammacdn.com/actors${avatarPath}`);
|
||||
@@ -929,7 +929,8 @@ async function fetchApiProfile({ name: actorName }, context, include) {
|
||||
const siteSlug = context.entity.slug || context.site?.slug || context.network?.slug;
|
||||
|
||||
const actorSlug = encodeURI(actorName);
|
||||
const referer = `https://www.${siteSlug}.com/en/search`;
|
||||
// const referer = `https://www.${siteSlug}.com/en/search`;
|
||||
const referer = `${new URL(context.entity.url).origin}/en/search`;
|
||||
|
||||
const { apiUrl } = await fetchApiCredentials(referer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user