Compare commits

..

No commits in common. "191a3628b5abf4c4aaec6a947399229d81fa8577" and "25f3dcf9a5edbe8dc239db3deed8ca7b9a4051ff" have entirely different histories.

5 changed files with 15 additions and 25 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.229.4", "version": "1.229.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.229.4", "version": "1.229.3",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.229.4", "version": "1.229.3",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@ -461,20 +461,17 @@ async function curateProfile(profile, actor) {
} }
} }
curatedProfile.social = [].concat(profile.social).map((social) => { curatedProfile.social = Array.isArray(profile.social)
if (!social) { ? profile.social.map((social) => {
return null; try {
} const { href } = new URL(social);
return href;
try { } catch (error) {
const { origin, pathname } = new URL(social); logger.warn(`Profile scraper for '${profile.entity.name}' returned invalid social link: ${social}`);
return null;
return `${origin}${pathname}`; }
} catch (error) { }).filter(Boolean)
logger.warn(`Profile scraper for '${profile.entity.name}' returned invalid social link: ${social}`); : [];
return null;
}
}).filter(Boolean);
curatedProfile.scenes = toBaseReleases(profile.scenes || profile.releases, profile.entity, actor) curatedProfile.scenes = toBaseReleases(profile.scenes || profile.releases, profile.entity, actor)
// attach actor to base scene, in case it was not scraped // attach actor to base scene, in case it was not scraped
@ -774,10 +771,6 @@ async function scrapeProfiles(actor, sources, entitiesBySlug, existingProfilesBy
return profiles.filter(Boolean); return profiles.filter(Boolean);
} }
async function associateSocials(profiles) {
console.log('profiles', profiles);
}
async function getActorNames(actorNames) { async function getActorNames(actorNames) {
if (actorNames.length > 0) { if (actorNames.length > 0) {
return actorNames; return actorNames;
@ -801,8 +794,6 @@ async function storeProfiles(profiles) {
const profilesWithAvatarIds = await associateAvatars(profiles); const profilesWithAvatarIds = await associateAvatars(profiles);
const actorIds = Array.from(new Set(profiles.map((profile) => profile.id))); const actorIds = Array.from(new Set(profiles.map((profile) => profile.id)));
// await associateSocials(profiles);
await upsertProfiles(profilesWithAvatarIds); await upsertProfiles(profilesWithAvatarIds);
await interpolateProfiles(actorIds); await interpolateProfiles(actorIds);
} }

View File

@ -247,7 +247,6 @@ const scrapers = {
mariskax, mariskax,
metrohd: mindgeek, metrohd: mindgeek,
milehighmedia: mindgeek, milehighmedia: mindgeek,
milfy: vixen,
milfvr: wankzvr, milfvr: wankzvr,
mofos: mindgeek, mofos: mindgeek,
mylf: teamskeet, mylf: teamskeet,

View File

@ -611,7 +611,7 @@ async function fetchProfile(actor, { channel }) {
}, },
}); });
if (res.ok && res.body.data?.model) { if (res.ok) {
return scrapeProfile(res.body.data, channel); return scrapeProfile(res.body.data, channel);
} }