Added BaDoink profile scraper. Improved convert wrapper.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const qu = require('../utils/qu');
|
||||
const slugify = require('../utils/slugify');
|
||||
const { convert } = require('../utils/convert');
|
||||
|
||||
function getPoster(posterSources) {
|
||||
if (posterSources?.[0]) {
|
||||
@@ -80,6 +82,38 @@ function scrapeScene({ query }, url, channel) {
|
||||
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) {
|
||||
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
|
||||
@@ -92,7 +126,19 @@ async function fetchLatest(channel, page) {
|
||||
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 = {
|
||||
fetchLatest,
|
||||
fetchProfile,
|
||||
scrapeScene,
|
||||
};
|
||||
|
||||
@@ -141,6 +141,7 @@ const scrapers = {
|
||||
xempire,
|
||||
},
|
||||
actors: {
|
||||
'18vr': badoink,
|
||||
'21sextury': gamma,
|
||||
allanal: mikeadriano,
|
||||
amateureuro: porndoe,
|
||||
@@ -151,7 +152,9 @@ const scrapers = {
|
||||
anilos: nubiles,
|
||||
aziani,
|
||||
babes: mindgeek,
|
||||
babevr: badoink,
|
||||
baddaddypov: fullpornnetwork,
|
||||
badoinkvr: badoink,
|
||||
bamvisions,
|
||||
bang,
|
||||
bangbros,
|
||||
@@ -163,20 +166,19 @@ const scrapers = {
|
||||
brazzers: mindgeek,
|
||||
burningangel: gamma,
|
||||
cherrypimps,
|
||||
pornworld: ddfnetwork,
|
||||
deeper: vixen,
|
||||
deeplush: nubiles,
|
||||
devilsfilm: famedigital,
|
||||
digitalplayground: mindgeek,
|
||||
dtfsluts: fullpornnetwork,
|
||||
dogfartnetwork: dogfart,
|
||||
dorcelclub: dorcel,
|
||||
doubleviewcasting: firstanalquest,
|
||||
dtfsluts: fullpornnetwork,
|
||||
elegantangel,
|
||||
evilangel: gamma,
|
||||
exploitedcollegegirls: fcuk,
|
||||
eyeontheguy: hush,
|
||||
fakehub: mindgeek,
|
||||
exploitedcollegegirls: fcuk,
|
||||
firstanalquest,
|
||||
forbondage: porndoe,
|
||||
freeones,
|
||||
@@ -202,7 +204,9 @@ const scrapers = {
|
||||
killergram,
|
||||
kink,
|
||||
legalporno,
|
||||
letsdoeit: porndoe,
|
||||
littlecapricedreams,
|
||||
mamacitaz: porndoe,
|
||||
men: mindgeek,
|
||||
metrohd: mindgeek,
|
||||
milehighmedia: mindgeek,
|
||||
@@ -215,31 +219,31 @@ const scrapers = {
|
||||
nubilesporn: nubiles,
|
||||
nympho: mikeadriano,
|
||||
onlyprince: fullpornnetwork,
|
||||
pascalssubsluts,
|
||||
pervcity,
|
||||
pervertgallery: fullpornnetwork,
|
||||
peternorth: famedigital,
|
||||
pierrewoodman,
|
||||
pimpxxx: cherrypimps,
|
||||
letsdoeit: porndoe,
|
||||
mamacitaz: porndoe,
|
||||
pascalssubsluts,
|
||||
porncz,
|
||||
pornhub,
|
||||
pornworld: ddfnetwork,
|
||||
povperverts: fullpornnetwork,
|
||||
povpornstars: hush,
|
||||
private: privateNetwork,
|
||||
realitykings: mindgeek,
|
||||
realvr: badoink,
|
||||
roccosiffredi: famedigital,
|
||||
score,
|
||||
seehimfuck: hush,
|
||||
sexyhub: mindgeek,
|
||||
silverstonedvd: famedigital,
|
||||
silviasaint: famedigital,
|
||||
topwebmodels,
|
||||
swallowed: mikeadriano,
|
||||
teamskeet,
|
||||
teencoreclub,
|
||||
thatsitcomshow: nubiles,
|
||||
topwebmodels,
|
||||
transangels: mindgeek,
|
||||
transbella: porndoe,
|
||||
trueanal: mikeadriano,
|
||||
@@ -248,6 +252,7 @@ const scrapers = {
|
||||
twistys: mindgeek,
|
||||
vipsexvault: porndoe,
|
||||
vixen,
|
||||
vrcosplayx: badoink,
|
||||
wicked: gamma,
|
||||
wildoncam: cherrypimps,
|
||||
xempire,
|
||||
|
||||
Reference in New Issue
Block a user