Added partial 'fcuk' (Exploited College Girls) scraper. Added file parameter for actor names and scene URLs.

This commit is contained in:
DebaucheryLibrarian
2020-07-15 03:24:47 +02:00
parent eca54c2a09
commit 17b3ba1272
54 changed files with 187 additions and 20 deletions

View File

@@ -69,7 +69,7 @@ function scrapeProfile(html) {
profile.avatar = {
src: `http://www.boobpedia.com${avatarPath}`,
copyright: null,
credit: null,
};
}

71
src/scrapers/fcuk.js Normal file
View File

@@ -0,0 +1,71 @@
'use strict';
const qu = require('../utils/qu');
function scrapeLatest(scenes, channel) {
return scenes.map(({ query }) => {
const release = {};
release.url = query.url('a.more:not([href*="/join.php"])', 'href', { origin: channel.url });
if (release.url) {
release.entryId = new URL(release.url).pathname.match(/\/scene\/(\d+)\/(\d+)/).slice(1, 3).join('-');
} else {
release.entryId = query.img('.bigthumb').match(/\/scenes\/(\w+)/)?.[1];
}
release.title = query.q('h5 strong', true)?.match(/. - (.+)$/)[1] || query.text('.videos h3');
release.description = query.text('p');
release.date = query.date('h5 strong, .videos h3', 'MMM. DD, YYYY', /\w+. \d{2}, \d{4}/);
release.poster = query.img('.bigthumb', null, { origin: channel.url });
release.photos = query.imgs('.smallthumb', null, { origin: channel.url });
release.tags = query.all('a[href*="/keywords"]', true);
return release;
});
}
function scrapeScene({ query }, url, channel) {
const release = {};
release.entryId = new URL(url).pathname.match(/\/scene\/(\d+)\/(\d+)/).slice(1, 3).join('-');
release.title = query.q('h4 strong, .videos h3', true);
release.description = query.q('#about p, .videos p', true);
const actors = query.urls('a[href*="/girl/"]').map(actorUrl => actorUrl.match(/video-(\w+)/)?.[1]).filter(Boolean);
if (actors.length > 0) {
release.actors = actors;
} else {
// release.actors = [query.q('.previewmed h5 strong', true)?.match(/^([\w\s]+),/)?.[0] || query.q('.videos h3', true)].filter(Boolean);
release.actors = [release.title];
}
release.tags = query.all('.info a[href*="/keywords"], .buttons a[href*="/keywords"]', true);
release.poster = query.img('#info .main-preview, .bigthumb', null, { origin: channel.url });
release.photos = [query.img('.previewmed img', null, { origin: channel.url })].concat(query.imgs('.hd-clip img, .smallthumb', null, { origin: channel.url })).filter(photo => photo);
return release;
}
async function fetchLatest(channel, page = 1) {
const url = `${channel.url}/free/updates/videos/${(page - 1) * 10}`;
const res = await qu.getAll(url, '.videos');
return res.ok ? scrapeLatest(res.items, channel) : res.status;
}
async function fetchScene(url, channel) {
const res = await qu.get(url);
return res.ok ? scrapeScene(res.item, url, channel) : res.status;
}
module.exports = {
fetchLatest,
fetchScene,
};

View File

@@ -52,7 +52,7 @@ function scrapeProfile(html, actorName) {
profile.social = Array.from(document.querySelectorAll('.profile-meta-item a.social-icons'), el => el.href);
const avatar = document.querySelector('.profile-image-large img').src;
if (!avatar.match('placeholder')) profile.avatar = { src: avatar, copyright: null };
if (!avatar.match('placeholder')) profile.avatar = { src: avatar, credit: null };
return profile;
}

View File

@@ -19,6 +19,7 @@ const evilangel = require('./evilangel');
const fakehub = require('./fakehub');
const famedigital = require('./famedigital');
const fantasymassage = require('./fantasymassage');
const fcuk = require('./fcuk');
const fullpornnetwork = require('./fullpornnetwork');
const girlsway = require('./girlsway');
const hush = require('./hush');
@@ -93,6 +94,7 @@ module.exports = {
fakehub,
famedigital,
fantasymassage,
fcuk,
forbondage: porndoe,
fullpornnetwork,
girlsway,