Added 21 Naturals and 21 Sextreme sites.

This commit is contained in:
ThePendulum 2020-02-10 23:11:11 +01:00
parent c411979edb
commit ce448da7e0
14 changed files with 88 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -2,6 +2,31 @@ const upsert = require('../src/utils/upsert');
/* eslint-disable max-len */
const sites = [
// 21NATURALS
{
slug: '21naturals',
name: '21Naturals',
url: 'https://www.21naturals.com',
network: '21naturals',
parameters: {
extract: '21naturals',
},
},
{
slug: '21footart',
name: '21 Foot Art',
url: 'https://21footart.21naturals.com',
network: '21naturals',
},
{
slug: '21eroticanal',
name: '21 Erotic Anal',
url: 'https://21eroticanal.21naturals.com',
network: '21naturals',
parameters: {
scene: 'https://21naturals.com/en/video',
},
},
// 21SEXTREME
{
slug: 'grandpasfuckteens',
@ -50,6 +75,7 @@ const sites = [
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'dominatedgirls',
@ -59,6 +85,7 @@ const sites = [
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'homepornreality',
@ -68,6 +95,57 @@ const sites = [
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'peeandblow',
name: 'Pee and Blow',
url: 'https://peeandblow.21sextreme.com',
network: '21sextreme',
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'cummingmatures',
name: 'Cumming Matures',
url: 'https://cummingmatures.21sextreme.com',
network: '21sextreme',
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'mandyiskinky',
name: 'Mandy Is Kinky',
url: 'https://mandyiskinky.21sextreme.com',
network: '21sextreme',
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'speculumplays',
name: 'Speculum Plays',
url: 'https://speculumplays.21sextreme.com',
network: '21sextreme',
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
{
slug: 'creampiereality',
name: 'Creampie Reality',
url: 'https://creampiereality.21sextreme.com',
network: '21sextreme',
parameters: {
scene: 'https://21sextreme.com/en/video',
},
scrape: false,
},
// 21SEXTURY
{

View File

@ -91,6 +91,10 @@ async function getPhotos(albumPath, site) {
async function scrapeApiReleases(json, site) {
return json.map((scene) => {
if (site.parameters?.extract && scene.sitename !== site.parameters.extract) {
return null;
}
const release = {
entryId: scene.clip_id,
title: scene.title,
@ -125,7 +129,7 @@ async function scrapeApiReleases(json, site) {
release.movie = `${site.url}/en/movie/${scene.url_movie_title}/${scene.movie_id}`;
return release;
});
}).filter(Boolean);
}
function scrapeAll(html, site, networkUrl, hasTeaser = true) {

View File

@ -51,7 +51,7 @@ function scrapeLatest(html, site) {
});
}
function scrapeScene(html, site) {
function scrapeScene(html, site, url) {
const { document } = new JSDOM(html).window;
const release = { site };
@ -59,6 +59,7 @@ function scrapeScene(html, site) {
release.description = document.querySelector('#story-and-tags td:nth-child(2) div').textContent;
const [actors, title, channel] = document.querySelector('title').textContent.split('|').map(item => item.trim());
release.url = url;
release.title = title;
release.actors = extractActors(actors);
release.channel = channel.toLowerCase();
@ -166,11 +167,11 @@ async function fetchScene(url, site) {
const session = bhttp.session(); // resolve redirects
const res = await session.get(url);
if (site.parameters.scraper === 'A') {
if (site.parameters?.scraper === 'A') {
return scrapeSceneA(res.body.toString(), site, null, url);
}
return scrapeScene(res.body.toString(), site);
return scrapeScene(res.body.toString(), site, url);
}
module.exports = {

View File

@ -111,9 +111,9 @@ async function fetchSitesFromArgv() {
'sites.*',
'networks.name as network_name', 'networks.slug as network_slug', 'networks.url as network_url', 'networks.description as network_description', 'networks.parameters as network_parameters',
)
.where('sites.scrape', true)
.whereIn('sites.slug', argv.sites || [])
.orWhereIn('networks.slug', argv.networks || [])
.where('sites.scrape', true)
.leftJoin('networks', 'sites.network_id', 'networks.id');
const curatedSites = await curateSites(rawSites, true);
@ -132,7 +132,6 @@ async function fetchSitesFromConfig() {
'networks.name as network_name', 'networks.slug as network_slug', 'networks.url as network_url', 'networks.description as network_description', 'networks.parameters as network_parameters',
)
.leftJoin('networks', 'sites.network_id', 'networks.id')
.where('sites.scrape', true)
.where((builder) => {
if (config.include) {
builder