Adapted Karups scraper for BoyFun.
This commit is contained in:
@@ -220,6 +220,7 @@ module.exports = {
|
||||
inthecrack,
|
||||
jerkaoke: modelmedia,
|
||||
karups,
|
||||
boyfun: karups,
|
||||
kellymadison,
|
||||
'8kmembers': kellymadison,
|
||||
// analvids,
|
||||
|
||||
@@ -18,7 +18,7 @@ function scrapeAll(scenes) {
|
||||
release.entryId = new URL(release.url).pathname.match(/(\d+)\.html/)?.[1];
|
||||
|
||||
release.title = query.content('.title');
|
||||
release.date = query.date('.date', 'MMM Do, YYYY');
|
||||
release.date = query.date('.date', ['MMM Do, YYYY', 'DD MMM YYYY'], { match: null });
|
||||
|
||||
release.channel = channelSlugs[query.content('.site')];
|
||||
|
||||
@@ -84,7 +84,19 @@ function scrapeScene({ query }, { url }) {
|
||||
function scrapeProfile({ query }, entity) {
|
||||
const profile = {};
|
||||
|
||||
profile.gender = 'female';
|
||||
const bio = Object.fromEntries(query.all('.model-table .item').map((bioEl) => [
|
||||
slugify(unprint.query.content(bioEl, '.label'), '_'),
|
||||
unprint.query.content(bioEl, '.value'),
|
||||
]));
|
||||
|
||||
profile.age = unprint.extractNumber(bio.date_of_birth); // seemingly only used on Boyfun and always age
|
||||
profile.height = unprint.extractNumber(bio.height);
|
||||
profile.weight = unprint.extractNumber(bio.height);
|
||||
|
||||
profile.penisLength = unprint.extractNumber(bio.dick_size);
|
||||
|
||||
if (bio.cut_uncut?.toLowerCase() === 'cut') profile.isCircumcised = true;
|
||||
if (bio.cut_uncut?.toLowerCase() === 'uncut') profile.isCircumcised = false;
|
||||
|
||||
profile.avatar = query.img('.model-thumb img[src*=".jpg"]');
|
||||
profile.scenes = scrapeAll(unprint.initAll(query.all('.listing-videos .item')), entity);
|
||||
@@ -92,12 +104,12 @@ function scrapeProfile({ query }, entity) {
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function getActorUrl(actor) {
|
||||
async function getActorUrl(actor, entity) {
|
||||
if (actor.url) {
|
||||
return actor.url;
|
||||
}
|
||||
|
||||
const res = await unprint.get(`https://www.karups.com/models/search/${actor.slug}/`, {
|
||||
const res = await unprint.get(`${entity.origin}/models/search/${actor.slug}/`, {
|
||||
selectAll: '.listing-models .item',
|
||||
cookies: {
|
||||
warningHidden: 'hide',
|
||||
@@ -114,7 +126,7 @@ async function getActorUrl(actor) {
|
||||
}
|
||||
|
||||
async function fetchProfile(actor, entity) {
|
||||
const actorUrl = await getActorUrl(actor);
|
||||
const actorUrl = await getActorUrl(actor, entity);
|
||||
|
||||
if (!actorUrl) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user