Added Naughty America profile and actor releases scraper.
This commit is contained in:
parent
c882862af6
commit
504bcd02e3
Binary file not shown.
After Width: | Height: | Size: 928 KiB |
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
|
@ -6,7 +6,7 @@ const tagPosters = Object.entries({
|
|||
'da-tp': [0, 'Natasha Teen in LegalPorno SZ2164'],
|
||||
'double-anal': [2, 'Lana Rhoades in "Gangbang Me 3" for HardX'],
|
||||
'double-penetration': ['poster', 'Mia Malkova in "DP!" for HardX'],
|
||||
'double-vaginal': ['poster'],
|
||||
'double-vaginal': [0, 'Aaliyah Hadid in "Squirting From Double Penetration With Anal" for Bang Bros'],
|
||||
'dv-tp': ['poster', 'Juelz Ventura in "Gangbanged 5" for Elegant Angel'],
|
||||
'oral-creampie': [1, 'Keisha Grey in Brazzers House'],
|
||||
'triple-anal': ['poster', 'Kristy Black in SZ1986 for LegalPorno'],
|
||||
|
@ -54,6 +54,7 @@ const tagPhotos = [
|
|||
['double-anal', 0, 'Nicole Black doing double anal during a gangbang in GIO971 for LegalPorno'],
|
||||
['double-anal', 1, 'Ria Sunn in SZ1801 for LegalPorno'],
|
||||
['double-penetration', 0],
|
||||
['double-vaginal', 'poster', 'Riley Reid in "Pizza That Ass" for Reid My Lips'],
|
||||
['dv-tp', 1, 'Adriana Chechik in "Adriana\'s Triple Anal Penetration!"'],
|
||||
['dv-tp', 0, 'Luna Rival in LegalPorno SZ1490'],
|
||||
['facefucking', '0', 'Brea for Young Throats'],
|
||||
|
|
|
@ -32,6 +32,7 @@ const { argv } = yargs
|
|||
.option('with-releases', {
|
||||
describe: 'Fetch all releases for an actor',
|
||||
type: 'boolean',
|
||||
alias: 'with-scenes',
|
||||
default: false,
|
||||
})
|
||||
.option('scene', {
|
||||
|
|
|
@ -5,6 +5,9 @@ const bhttp = require('bhttp');
|
|||
const cheerio = require('cheerio');
|
||||
const moment = require('moment');
|
||||
|
||||
const slugify = require('../utils/slugify');
|
||||
const { ex } = require('../utils/q');
|
||||
|
||||
function titleExtractor(pathname) {
|
||||
const components = pathname.split('/')[2].split('-');
|
||||
const entryId = components.slice(-1)[0];
|
||||
|
@ -48,7 +51,7 @@ function scrapeLatest(html, site) {
|
|||
});
|
||||
}
|
||||
|
||||
async function scrapeScene(html, url, site) {
|
||||
function scrapeScene(html, url, site) {
|
||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||
const sceneElement = $('.scene-info');
|
||||
|
||||
|
@ -97,6 +100,20 @@ async function scrapeScene(html, url, site) {
|
|||
};
|
||||
}
|
||||
|
||||
function scrapeProfile(html) {
|
||||
const { q, qu } = ex(html);
|
||||
const profile = {};
|
||||
|
||||
profile.description = q('.bio_about_text', true);
|
||||
|
||||
const avatar = q('img.performer-pic', 'src');
|
||||
if (avatar) profile.avatar = `https:${avatar}`;
|
||||
|
||||
profile.releases = qu('.scene-item > a:first-child');
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchLatest(site, page = 1) {
|
||||
const res = await bhttp.get(`${site.url}?page=${page}`);
|
||||
|
||||
|
@ -109,7 +126,20 @@ async function fetchScene(url, site) {
|
|||
return scrapeScene(res.body.toString(), url, site);
|
||||
}
|
||||
|
||||
async function fetchProfile(actorName) {
|
||||
const actorSlug = slugify(actorName);
|
||||
|
||||
const res = await bhttp.get(`https://www.naughtyamerica.com/pornstar/${actorSlug}`);
|
||||
|
||||
if (res.statusCode === 200) {
|
||||
return scrapeProfile(res.body.toString());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
fetchLatest,
|
||||
fetchScene,
|
||||
fetchProfile,
|
||||
};
|
||||
|
|
|
@ -17,7 +17,6 @@ const pornpros = require('./pornpros');
|
|||
const privateNetwork = require('./private'); // reserved keyword
|
||||
const puretaboo = require('./puretaboo');
|
||||
const mindgeek = require('./mindgeek');
|
||||
const naughtyamerica = require('./naughtyamerica');
|
||||
const realitykings = require('./realitykings');
|
||||
const teamskeet = require('./teamskeet');
|
||||
const vixen = require('./vixen');
|
||||
|
@ -34,6 +33,7 @@ const legalporno = require('./legalporno');
|
|||
const men = require('./men');
|
||||
const metrohd = require('./metrohd');
|
||||
const mofos = require('./mofos');
|
||||
const naughtyamerica = require('./naughtyamerica');
|
||||
const twentyonesextury = require('./21sextury');
|
||||
const xempire = require('./xempire');
|
||||
|
||||
|
@ -89,6 +89,7 @@ module.exports = {
|
|||
mofos,
|
||||
realitykings,
|
||||
digitalplayground,
|
||||
brazzers,
|
||||
fakehub,
|
||||
babes,
|
||||
metrohd,
|
||||
|
@ -99,7 +100,7 @@ module.exports = {
|
|||
xempire,
|
||||
blowpass,
|
||||
julesjordan,
|
||||
brazzers,
|
||||
naughtyamerica,
|
||||
boobpedia,
|
||||
legalporno,
|
||||
kellymadison,
|
||||
|
|
Loading…
Reference in New Issue