Added ExploitedX profile tests, fixed bio queries.
This commit is contained in:
@@ -193,6 +193,7 @@ module.exports = {
|
||||
// etc
|
||||
'18vr': badoink,
|
||||
theflourishxxx: theflourish,
|
||||
exploitedx, // only from known URL that will specify site
|
||||
fullpornnetwork,
|
||||
adultempire,
|
||||
allherluv: missax,
|
||||
@@ -213,7 +214,6 @@ module.exports = {
|
||||
cumlouder,
|
||||
dorcelclub: dorcel,
|
||||
doubleviewcasting: firstanalquest,
|
||||
exploitedx, // only from known URL that will specify site
|
||||
firstanalquest,
|
||||
freeones,
|
||||
hitzefrei,
|
||||
|
||||
@@ -75,10 +75,11 @@ function scrapeScene({ query }, { url }) {
|
||||
function scrapeProfile({ query }, _entity) {
|
||||
const profile = {};
|
||||
|
||||
const bio = Object.fromEntries(query.all('.detail-div p').map((detailEl) => [
|
||||
slugify(unprint.query.content(detailEl, 'strong'), '_'),
|
||||
unprint.query.text(detailEl),
|
||||
]));
|
||||
// all three selectors still apply to different sites
|
||||
const keys = query.contents('h1 + div strong, .bio-items li strong, .detail-div p strong');
|
||||
const values = query.texts('h1 + div, .bio-items li, .detail-div p', { join: false }).flat();
|
||||
|
||||
const bio = Object.fromEntries(keys.map((key, index) => [slugify(key, '_'), values[index]]));
|
||||
|
||||
profile.age = Number(bio.age) || null;
|
||||
profile.height = convert(bio.height, 'cm');
|
||||
@@ -86,15 +87,18 @@ function scrapeProfile({ query }, _entity) {
|
||||
|
||||
profile.description = [
|
||||
bio.favorite_position && `Favorite position: ${bio.favorite_position}`,
|
||||
bio.favorite_sex_toy && `Favorite sex toy: ${bio.favorite_sex_toy}`,
|
||||
bio.likes && `Likes: ${bio.likes}`,
|
||||
].filter(Boolean).join('\n');
|
||||
].filter(Boolean).join('\n') || null;
|
||||
|
||||
profile.avatar = [
|
||||
query.img('.model_bio_thumb', { attribute: 'src0_2x' }),
|
||||
query.img('.model_bio_thumb', { attribute: 'src0_1x' }),
|
||||
query.img('.model_bio_thumb', { attribute: 'src0_3x' }), // too big
|
||||
query.img('.model-bio__image, .model_bio_thumb', { attribute: 'src0_2x' }),
|
||||
query.img('.model-bio__image, .model_bio_thumb', { attribute: 'src0_1x' }),
|
||||
query.img('.model-bio__image, .model_bio_thumb', { attribute: 'src0_3x' }), // too big
|
||||
];
|
||||
|
||||
console.log(bio);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user