Compare commits
2 Commits
25f3dcf9a5
...
191a3628b5
| Author | SHA1 | Date |
|---|---|---|
|
|
191a3628b5 | |
|
|
80750b44dc |
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.229.3",
|
"version": "1.229.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.229.3",
|
"version": "1.229.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.229.3",
|
"version": "1.229.4",
|
||||||
"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": {
|
||||||
|
|
|
||||||
|
|
@ -461,17 +461,20 @@ async function curateProfile(profile, actor) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
curatedProfile.social = Array.isArray(profile.social)
|
curatedProfile.social = [].concat(profile.social).map((social) => {
|
||||||
? profile.social.map((social) => {
|
if (!social) {
|
||||||
try {
|
return null;
|
||||||
const { href } = new URL(social);
|
}
|
||||||
return href;
|
|
||||||
} catch (error) {
|
try {
|
||||||
logger.warn(`Profile scraper for '${profile.entity.name}' returned invalid social link: ${social}`);
|
const { origin, pathname } = new URL(social);
|
||||||
return null;
|
|
||||||
}
|
return `${origin}${pathname}`;
|
||||||
}).filter(Boolean)
|
} catch (error) {
|
||||||
: [];
|
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
|
||||||
|
|
@ -771,6 +774,10 @@ 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;
|
||||||
|
|
@ -794,6 +801,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@ 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,
|
||||||
|
|
|
||||||
|
|
@ -611,7 +611,7 @@ async function fetchProfile(actor, { channel }) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok && res.body.data?.model) {
|
||||||
return scrapeProfile(res.body.data, channel);
|
return scrapeProfile(res.body.data, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue