Improved Model Media profile scraper for Delphine, added test.
This commit is contained in:
parent
d4b73b6dd3
commit
93df88768c
|
|
@ -200,7 +200,7 @@ module.exports = {
|
|||
// model media
|
||||
jerkaoke: modelmedia,
|
||||
modelmediaasia: modelmedia,
|
||||
// delphine: modelmedia,
|
||||
delphine: modelmedia,
|
||||
// etc
|
||||
'18vr': badoink,
|
||||
theflourishxxx: theflourish,
|
||||
|
|
|
|||
|
|
@ -204,8 +204,8 @@ async function fetchProfileApi(actor, { entity, parameters }) {
|
|||
return null;
|
||||
}
|
||||
|
||||
function scrapeProfile({ query }) {
|
||||
const profile = {};
|
||||
function scrapeProfile({ query }, url) {
|
||||
const profile = { url };
|
||||
const avatar = query.img('div[class*="prof-pic"] > img');
|
||||
|
||||
if (avatar) {
|
||||
|
|
@ -216,12 +216,11 @@ function scrapeProfile({ query }) {
|
|||
}
|
||||
|
||||
profile.description = query.content('h2') || null;
|
||||
profile.height = query.number('//span[text()="Height"]/following-sibling::span', { match: /(\d+) cm/, matchIndex: 1 });
|
||||
profile.weight = query.number('//span[text()="Weight"]/following-sibling::span', { match: /(\d+) kg/, matchIndex: 1 });
|
||||
profile.height = query.number('//span[text()="Height"]/following-sibling::node()[self::span or self::text()]', { match: /(\d+) cm/, matchIndex: 1 });
|
||||
profile.weight = query.number('//span[text()="Weight"]/following-sibling::node()[self::span or self::text()]', { match: /(\d+) kg/, matchIndex: 1 });
|
||||
|
||||
// can't find a single profile wiht this information available, but add for good measure
|
||||
profile.measurements = query.content('//span[text()="Measurements"]/following-sibling::span');
|
||||
profile.birthPlace = query.number('//span[text()="Birth Place"]/following-sibling::span');
|
||||
profile.measurements = query.content('//span[text()="Measurements"]/following-sibling::node()[self::span or self::text()]');
|
||||
profile.birthPlace = query.content('//span[text()="Birth Place"]/following-sibling::node()[self::span or self::text()]');
|
||||
|
||||
profile.banner = query.img('div[class*="banner"] > img');
|
||||
profile.photos = query.imgs('#MusModelSwiper img');
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ module.exports = {
|
|||
cumlouder,
|
||||
czechav,
|
||||
pornworld,
|
||||
// delphine: modelmedia,
|
||||
delphine: modelmedia,
|
||||
dorcel,
|
||||
elegantangel: adultempire,
|
||||
exploitedx,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ const actors = [
|
|||
// model media
|
||||
{ entity: 'jerkaoke', name: 'Harley Haze', fields: ['avatar', 'description', 'height', 'weight', 'banner', 'photos'] },
|
||||
{ entity: 'modelmediaasia', name: 'Li WeiWei', fields: ['avatar', 'entryId', 'gender', 'alias', 'height', 'weight', 'bust', 'waist', 'hip', 'socials'] },
|
||||
{ entity: 'delphine', name: 'Bridgette B', fields: ['avatar', 'measurements', 'birthPlace'] },
|
||||
// etc.
|
||||
{ entity: 'analvids', name: 'Veronica Leal', fields: ['avatar', 'gender', 'birthCountry', 'nationality', 'age', 'aliases', 'nationality'] },
|
||||
{ entity: 'bangbros', name: 'Kira Perez', fields: ['avatar', 'gender', 'ethnicity', 'hairColor'] },
|
||||
|
|
|
|||
Loading…
Reference in New Issue