Filtering out 'Amateur' model in Model Media API.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
const adultempire = require('./adultempire');
|
||||
const angelogodshackoriginal = require('./angelogodshackoriginal');
|
||||
const americanpornstar = require('./americanpornstar');
|
||||
// const americanpornstar = require('./americanpornstar'); // offline
|
||||
const aziani = require('./aziani');
|
||||
const badoink = require('./badoink');
|
||||
const bamvisions = require('./bamvisions');
|
||||
@@ -163,10 +163,10 @@ module.exports = {
|
||||
thatsitcomshow: nubiles,
|
||||
// porndoe
|
||||
amateureuro: porndoe,
|
||||
forbondage: porndoe,
|
||||
mamacitaz: porndoe,
|
||||
transbella: porndoe,
|
||||
vipsexvault: porndoe,
|
||||
// forbondage: porndoe,
|
||||
// aziani
|
||||
aziani,
|
||||
'2poles1hole': aziani,
|
||||
@@ -209,7 +209,7 @@ module.exports = {
|
||||
fullpornnetwork,
|
||||
adultempire,
|
||||
allherluv: missax,
|
||||
americanpornstar,
|
||||
// americanpornstar,
|
||||
angelogodshackoriginal,
|
||||
babevr: badoink,
|
||||
badoinkvr: badoink,
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
const unprint = require('unprint');
|
||||
|
||||
const http = require('../utils/http');
|
||||
const slugify = require('../utils/slugify');
|
||||
const { feetInchesToCm, lbsToKg } = require('../utils/convert');
|
||||
const { convert } = require('../utils/convert');
|
||||
|
||||
function scrapeAll(scenes, channel, _options) {
|
||||
return scenes.map(({ query }) => {
|
||||
@@ -122,7 +121,7 @@ async function scrapeProfile({ query }) {
|
||||
const bioText = query.content('#profileModal .well');
|
||||
|
||||
profile.description = query.content('#profileModal .modal-body')
|
||||
.slice(bioText.length)
|
||||
?.slice(bioText?.length || 0)
|
||||
.replace(/Biography Text ©Adult DVD Empire/i, '')
|
||||
.trim();
|
||||
|
||||
@@ -132,8 +131,8 @@ async function scrapeProfile({ query }) {
|
||||
profile.eyes = bio.eyes;
|
||||
profile.ethnicity = bio.ethnicity;
|
||||
|
||||
profile.height = feetInchesToCm(bio.height);
|
||||
profile.weight = lbsToKg(bio.weight);
|
||||
profile.height = convert(bio.height, 'cm');
|
||||
profile.weight = convert(bio.weight, 'lb', 'kg');
|
||||
|
||||
const avatar = query.img('picture img, .performer-image-container img');
|
||||
|
||||
@@ -146,6 +145,8 @@ async function scrapeProfile({ query }) {
|
||||
];
|
||||
}
|
||||
|
||||
console.log(profile);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
@@ -155,8 +156,8 @@ async function fetchLatest(channel, page, options) {
|
||||
? `${options.parameters.latest}?page=${page}&view=grid`
|
||||
: `${channel.url}/watch-newest-clips-and-scenes.html?page=${page}&view=grid`, {
|
||||
selectAll: '.item-grid-scene .grid-item',
|
||||
headers: {
|
||||
Cookie: 'ageConfirmed=true;',
|
||||
cookies: {
|
||||
ageConfirmed: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -171,6 +172,9 @@ async function fetchProfilePage(actorUrl) {
|
||||
const res = await unprint.get(actorUrl, {
|
||||
select: '#content',
|
||||
rejectUnauthorized: false,
|
||||
cookies: {
|
||||
ageConfirmed: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
@@ -189,10 +193,14 @@ async function fetchProfile(baseActor, channel, include) {
|
||||
}
|
||||
}
|
||||
|
||||
const searchRes = await http.get(`https://www.adultempire.com/search/SearchAutoComplete_Agg_EmpireDTRank?search_type=Pornstars&rows=9&name_startsWith=${slugify(baseActor.name, '+')}`);
|
||||
const searchRes = await unprint.get(`https://www.adultempire.com/search/SearchAutoComplete_Agg_EmpireDTRank?search_type=Pornstars&rows=9&name_startsWith=${slugify(baseActor.name, '+')}`, {
|
||||
cookies: {
|
||||
ageConfirmed: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (searchRes.ok && searchRes.body.Results) {
|
||||
const actorResult = searchRes.body.Results.find((result) => /performer/i.test(result.BasicResponseGroup?.displaytype) && new RegExp(baseActor.name, 'i').test(result.BasicResponseGroup?.description));
|
||||
if (searchRes.ok && searchRes.data.Results) {
|
||||
const actorResult = searchRes.data.Results.find((result) => /performer/i.test(result.BasicResponseGroup?.displaytype) && new RegExp(baseActor.name, 'i').test(result.BasicResponseGroup?.description));
|
||||
|
||||
if (actorResult) {
|
||||
const url = `https://www.adultempire.com/${actorResult.BasicResponseGroup.id}`;
|
||||
|
||||
@@ -30,7 +30,7 @@ function scrapeSceneApi(scene, channel, parameters) {
|
||||
model.avatar,
|
||||
model.avatar?.replace('_compressed', ''), // this is often a wider image, not just uncompressed
|
||||
])).filter(Boolean),
|
||||
}));
|
||||
})).filter((actor) => actor.name?.toLowerCase() === 'amateur'); // generic name for various amateur models
|
||||
|
||||
release.tags = scene.tags?.map((tag) => tag.name);
|
||||
|
||||
@@ -131,6 +131,10 @@ function scrapeAll(scenes) {
|
||||
function scrapeProfileApi(model, channel, parameters) {
|
||||
const profile = {};
|
||||
|
||||
if (model.name?.toLowerCase() === 'amateur') {
|
||||
return null; // generic profile for various amateur models
|
||||
}
|
||||
|
||||
profile.entryId = model.id;
|
||||
profile.url = `${channel.origin}${parameters.basePath || ''}/models/${model.id}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user