Added BaDoink profile scraper. Improved convert wrapper.

This commit is contained in:
DebaucheryLibrarian 2021-02-03 21:03:35 +01:00
parent cd417f40a8
commit 79b51eca67
5 changed files with 87 additions and 9 deletions

View File

@ -631,6 +631,9 @@ const sites = [
url: 'https://www.badoinkvr.com', url: 'https://www.badoinkvr.com',
tags: ['vr'], tags: ['vr'],
parent: 'badoink', parent: 'badoink',
parameters: {
actor: 'vr-pornstar',
},
}, },
{ {
name: 'VR Cosplay X', name: 'VR Cosplay X',
@ -640,6 +643,7 @@ const sites = [
parent: 'badoink', parent: 'badoink',
parameters: { parameters: {
latest: 'cosplaypornvideos', latest: 'cosplaypornvideos',
actor: 'cosplaygirl',
}, },
}, },
{ {
@ -648,6 +652,9 @@ const sites = [
url: 'https://18vr.com', url: 'https://18vr.com',
tags: ['vr'], tags: ['vr'],
parent: 'badoink', parent: 'badoink',
parameters: {
actor: 'vrgirl',
},
}, },
{ {
name: 'BabeVR', name: 'BabeVR',
@ -655,6 +662,9 @@ const sites = [
url: 'https://babevr.com', url: 'https://babevr.com',
tags: ['vr'], tags: ['vr'],
parent: 'badoink', parent: 'badoink',
parameters: {
actor: 'vrbabe',
},
}, },
{ {
name: 'RealVR', name: 'RealVR',
@ -663,6 +673,7 @@ const sites = [
tags: ['vr'], tags: ['vr'],
parameters: { parameters: {
teasers: false, teasers: false,
actor: 'pornstar',
}, },
parent: 'badoink', parent: 'badoink',
}, },

View File

@ -324,6 +324,7 @@ async function curateProfile(profile, actor) {
const curatedProfile = { const curatedProfile = {
id: profile.id, id: profile.id,
name: profile.name, name: profile.name,
url: profile.url,
avatar: profile.avatar, avatar: profile.avatar,
scraper: profile.scraper, scraper: profile.scraper,
entity: profile.entity, entity: profile.entity,
@ -365,10 +366,22 @@ async function curateProfile(profile, actor) {
curatedProfile.height = Number(profile.height) || profile.height?.match?.(/\d+/)?.[0] || null; curatedProfile.height = Number(profile.height) || profile.height?.match?.(/\d+/)?.[0] || null;
curatedProfile.weight = Number(profile.weight) || profile.weight?.match?.(/\d+/)?.[0] || null; curatedProfile.weight = Number(profile.weight) || profile.weight?.match?.(/\d+/)?.[0] || null;
// separate measurement values
curatedProfile.cup = profile.cup || (typeof profile.bust === 'string' && profile.bust?.match?.(/[a-zA-Z]+/)?.[0]) || null; curatedProfile.cup = profile.cup || (typeof profile.bust === 'string' && profile.bust?.match?.(/[a-zA-Z]+/)?.[0]) || null;
curatedProfile.bust = Number(profile.bust) || profile.bust?.match?.(/\d+/)?.[0] || null; curatedProfile.bust = Number(profile.bust) || profile.bust?.match?.(/\d+/)?.[0] || null;
curatedProfile.waist = Number(profile.waist) || profile.waist?.match?.(/\d+/)?.[0] || null; curatedProfile.waist = Number(profile.waist) || profile.waist?.match?.(/\d+/)?.[0] || null;
curatedProfile.hip = Number(profile.hip) || profile.hip?.match?.(/\d+/)?.[0] || null; curatedProfile.hip = Number(profile.hip) || profile.hip?.match?.(/\d+/)?.[0] || null;
// combined measurement value
const measurements = profile.measurements?.match(/(\d+)(\w+)-(\d+)-(\d+)/);
if (measurements) {
curatedProfile.bust = Number(measurements[1]);
curatedProfile.cup = measurements[2];
curatedProfile.waist = Number(measurements[3]);
curatedProfile.hip = Number(measurements[4]);
}
curatedProfile.penisLength = Number(profile.penisLength) || profile.penisLength?.match?.(/\d+/)?.[0] || null; curatedProfile.penisLength = Number(profile.penisLength) || profile.penisLength?.match?.(/\d+/)?.[0] || null;
curatedProfile.penisGirth = Number(profile.penisGirth) || profile.penisGirth?.match?.(/\d+/)?.[0] || null; curatedProfile.penisGirth = Number(profile.penisGirth) || profile.penisGirth?.match?.(/\d+/)?.[0] || null;

View File

@ -1,6 +1,8 @@
'use strict'; 'use strict';
const qu = require('../utils/qu'); const qu = require('../utils/qu');
const slugify = require('../utils/slugify');
const { convert } = require('../utils/convert');
function getPoster(posterSources) { function getPoster(posterSources) {
if (posterSources?.[0]) { if (posterSources?.[0]) {
@ -80,6 +82,38 @@ function scrapeScene({ query }, url, channel) {
return release; return release;
} }
function scrapeProfile({ query }, url, entity) {
const profile = { url };
const bio = query.all('.girl-details-stats-item').reduce((acc, el) => ({
...acc,
[slugify(qu.query.cnt(el, '.girl-details-stat'))]: qu.query.cnt(el, '.girl-details-stat-value'),
}), {});
profile.description = query.cnt('.girl-details-bio');
profile.age = bio.age;
profile.birthPlace = bio.country;
profile.ethnicity = bio.ethnicity;
profile.height = convert(bio.height, 'cm');
profile.weight = convert(bio.weight, 'lb', 'kg');
profile.measurements = bio.measurements;
profile.hairColor = bio.hair;
profile.eyes = bio.eyes;
const avatarSources = query.srcset('.girl-details-photo-content picture source', 'srcset') || [query.img('.girl-details-photo')];
profile.avatar = getPoster(avatarSources);
profile.social = query.urls('.girl-details-social-media-list a');
profile.scenes = scrapeAll(qu.initAll(query.all('.video-card')), entity);
return profile;
}
async function fetchLatest(channel, page) { async function fetchLatest(channel, page) {
const res = await qu.getAll(`${channel.url}/${channel.parameters?.latest || 'vrpornvideos'}/${page}`, '.video-card', { const res = await qu.getAll(`${channel.url}/${channel.parameters?.latest || 'vrpornvideos'}/${page}`, '.video-card', {
Cookie: 'affsubid=12345-;', // required to show teaser video, exact number doesn't seem to matter Cookie: 'affsubid=12345-;', // required to show teaser video, exact number doesn't seem to matter
@ -92,7 +126,19 @@ async function fetchLatest(channel, page) {
return res.status; return res.status;
} }
async function fetchProfile(baseActor, { entity }) {
const url = `${entity.url}/${entity.parameters?.actor || 'pornstar'}/${slugify(baseActor.name, '')}/`;
const res = await qu.get(url);
if (res.ok) {
return scrapeProfile(res.item, url, entity);
}
return res.status;
}
module.exports = { module.exports = {
fetchLatest, fetchLatest,
fetchProfile,
scrapeScene, scrapeScene,
}; };

View File

@ -141,6 +141,7 @@ const scrapers = {
xempire, xempire,
}, },
actors: { actors: {
'18vr': badoink,
'21sextury': gamma, '21sextury': gamma,
allanal: mikeadriano, allanal: mikeadriano,
amateureuro: porndoe, amateureuro: porndoe,
@ -151,7 +152,9 @@ const scrapers = {
anilos: nubiles, anilos: nubiles,
aziani, aziani,
babes: mindgeek, babes: mindgeek,
babevr: badoink,
baddaddypov: fullpornnetwork, baddaddypov: fullpornnetwork,
badoinkvr: badoink,
bamvisions, bamvisions,
bang, bang,
bangbros, bangbros,
@ -163,20 +166,19 @@ const scrapers = {
brazzers: mindgeek, brazzers: mindgeek,
burningangel: gamma, burningangel: gamma,
cherrypimps, cherrypimps,
pornworld: ddfnetwork,
deeper: vixen, deeper: vixen,
deeplush: nubiles, deeplush: nubiles,
devilsfilm: famedigital, devilsfilm: famedigital,
digitalplayground: mindgeek, digitalplayground: mindgeek,
dtfsluts: fullpornnetwork,
dogfartnetwork: dogfart, dogfartnetwork: dogfart,
dorcelclub: dorcel, dorcelclub: dorcel,
doubleviewcasting: firstanalquest, doubleviewcasting: firstanalquest,
dtfsluts: fullpornnetwork,
elegantangel, elegantangel,
evilangel: gamma, evilangel: gamma,
exploitedcollegegirls: fcuk,
eyeontheguy: hush, eyeontheguy: hush,
fakehub: mindgeek, fakehub: mindgeek,
exploitedcollegegirls: fcuk,
firstanalquest, firstanalquest,
forbondage: porndoe, forbondage: porndoe,
freeones, freeones,
@ -202,7 +204,9 @@ const scrapers = {
killergram, killergram,
kink, kink,
legalporno, legalporno,
letsdoeit: porndoe,
littlecapricedreams, littlecapricedreams,
mamacitaz: porndoe,
men: mindgeek, men: mindgeek,
metrohd: mindgeek, metrohd: mindgeek,
milehighmedia: mindgeek, milehighmedia: mindgeek,
@ -215,31 +219,31 @@ const scrapers = {
nubilesporn: nubiles, nubilesporn: nubiles,
nympho: mikeadriano, nympho: mikeadriano,
onlyprince: fullpornnetwork, onlyprince: fullpornnetwork,
pascalssubsluts,
pervcity, pervcity,
pervertgallery: fullpornnetwork, pervertgallery: fullpornnetwork,
peternorth: famedigital, peternorth: famedigital,
pierrewoodman, pierrewoodman,
pimpxxx: cherrypimps, pimpxxx: cherrypimps,
letsdoeit: porndoe,
mamacitaz: porndoe,
pascalssubsluts,
porncz, porncz,
pornhub, pornhub,
pornworld: ddfnetwork,
povperverts: fullpornnetwork, povperverts: fullpornnetwork,
povpornstars: hush, povpornstars: hush,
private: privateNetwork, private: privateNetwork,
realitykings: mindgeek, realitykings: mindgeek,
realvr: badoink,
roccosiffredi: famedigital, roccosiffredi: famedigital,
score, score,
seehimfuck: hush, seehimfuck: hush,
sexyhub: mindgeek, sexyhub: mindgeek,
silverstonedvd: famedigital, silverstonedvd: famedigital,
silviasaint: famedigital, silviasaint: famedigital,
topwebmodels,
swallowed: mikeadriano, swallowed: mikeadriano,
teamskeet, teamskeet,
teencoreclub, teencoreclub,
thatsitcomshow: nubiles, thatsitcomshow: nubiles,
topwebmodels,
transangels: mindgeek, transangels: mindgeek,
transbella: porndoe, transbella: porndoe,
trueanal: mikeadriano, trueanal: mikeadriano,
@ -248,6 +252,7 @@ const scrapers = {
twistys: mindgeek, twistys: mindgeek,
vipsexvault: porndoe, vipsexvault: porndoe,
vixen, vixen,
vrcosplayx: badoink,
wicked: gamma, wicked: gamma,
wildoncam: cherrypimps, wildoncam: cherrypimps,
xempire, xempire,

View File

@ -61,7 +61,8 @@ function kgToLbs(kgs) {
function convertManyApi(input, to) { function convertManyApi(input, to) {
const curatedInput = input const curatedInput = input
.replace('\'', 'ft') .replace('\'', 'ft')
.replace('"', 'in'); .replace(/"|''/, 'in')
.replace(/\d+ft\s*\d+\s*$/, match => `${match}in`); // height without any inch symbol
return Math.round(convertMany(curatedInput).to(to)) || null; return Math.round(convertMany(curatedInput).to(to)) || null;
} }
@ -76,7 +77,9 @@ function convertApi(input, fromOrTo, to) {
return convertManyApi(input, fromOrTo); return convertManyApi(input, fromOrTo);
} }
return Math.round(convert(input).from(fromOrTo).to(to)) || null; const inputNumber = Number(typeof input === 'string' ? input.match(/\d+(\.\d+)?/)?.[0] : input);
return Math.round(convert(inputNumber).from(fromOrTo).to(to)) || null;
} catch (error) { } catch (error) {
logger.error(error); logger.error(error);
return null; return null;