Added 5K Porn and 5K Teens.

This commit is contained in:
DebaucheryLibrarian 2020-07-14 04:36:14 +02:00
parent 032d8bee1b
commit 74b15aa8e9
24 changed files with 57 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -62,6 +62,11 @@ const tags = [
slug: '4k', slug: '4k',
description: 'Available in high quality 4K resolution.', description: 'Available in high quality 4K resolution.',
}, },
{
name: '5K',
slug: '5k',
description: 'Available in very high quality 5K resolution.',
},
{ {
name: '69', name: '69',
slug: '69', slug: '69',

View File

@ -2763,6 +2763,20 @@ const sites = [
description: 'Home of Kelly Madison and Ryan Madison', description: 'Home of Kelly Madison and Ryan Madison',
parent: 'kellymadison', parent: 'kellymadison',
}, },
{
slug: '5kporn',
name: '5K Porn',
url: 'https://www.5kporn.com',
tags: ['5k'],
parent: 'kellymadison',
},
{
slug: '5kteens',
name: '5K Teens',
url: 'https://www.5kteens.com',
tags: ['5k'],
parent: 'kellymadison',
},
// KILLERGRAM // KILLERGRAM
{ {
name: 'Urban Perversions', name: 'Urban Perversions',

View File

@ -9,6 +9,8 @@ const siteMapByKey = {
PF: 'pornfidelity', PF: 'pornfidelity',
TF: 'teenfidelity', TF: 'teenfidelity',
KM: 'kellymadison', KM: 'kellymadison',
'5KP': '5kporn',
'5KT': '5kteens',
}; };
const siteMapBySlug = Object.entries(siteMapByKey).reduce((acc, [key, value]) => ({ ...acc, [value]: key }), {}); const siteMapBySlug = Object.entries(siteMapByKey).reduce((acc, [key, value]) => ({ ...acc, [value]: key }), {});
@ -17,9 +19,9 @@ function scrapeLatest(scenes, site) {
return scenes.map(({ query }) => { return scenes.map(({ query }) => {
const release = { site }; const release = { site };
release.shootId = query.q('.card-meta .text-right', true); release.shootId = query.q('.card-meta .text-right, .row .text-right', true);
const siteId = release.shootId.match(/\w{2}/)[0]; const siteId = release.shootId.match(/\d?\w{2}/)[0];
const siteSlug = siteMapByKey[siteId]; const siteSlug = siteMapByKey[siteId];
if (site.slug !== siteSlug) { if (site.slug !== siteSlug) {
@ -27,24 +29,28 @@ function scrapeLatest(scenes, site) {
return null; return null;
} }
const { pathname } = new URL(query.url('h5 a')); const { pathname } = new URL(query.url('h5 a, .ep-title a'));
[release.entryId] = pathname.match(/\d+$/); [release.entryId] = pathname.match(/\d+$/);
release.url = `${site.url}/episodes/${release.entryId}`; release.url = `${site.url}${pathname}`;
release.title = query.q('h5 a', true); release.title = query.q('h5 a, .ep-title a', true);
release.date = query.date('.card-meta .text-left', ['MMM D', 'MMM D, YYYY'], /\w+ \d+(, \w+)?/); release.date = query.date('.card-meta .text-left, .row .col-4:first-child', ['MMM D', 'MMM D, YYYY'], /\w+ \d+(, \w+)?/);
release.actors = query.all('.models a', true); release.actors = query.all('.models a, .ep-models a', true);
release.duration = query.dur('.content a'); release.duration = query.dur('.content a');
const duration = query.q('.content a', true).match(/(\d+) min/)[1]; const duration = query.q('.content a, .ep-runtime strong', true).match(/(\d+) min/)[1];
if (duration) release.duration = Number(duration) * 60; if (duration) release.duration = Number(duration) * 60;
release.poster = query.img('.card-img-top'); if (query.exists('.episodes-preview')) {
release.teaser = { [release.poster, ...release.photos] = query.imgs('.episodes-preview img');
src: query.video('video'), } else {
}; release.poster = query.img('.card-img-top');
release.teaser = {
src: query.video('video'),
};
}
return release; return release;
}).filter(scene => scene); }).filter(scene => scene);
@ -56,28 +62,38 @@ async function scrapeScene({ query, html }, url, baseRelease) {
[release.entryId] = pathname.match(/\d+$/); [release.entryId] = pathname.match(/\d+$/);
const titleString = query.q('.card-header.row h4', true); const titleString = query.q('.card-header.row h4, .trailer-starring span', true);
const episode = titleString.match(/#\d+$/)[0]; const episode = titleString.match(/#\d+$/)[0];
release.title = titleString.match(/Trailer: ([\w\s]+) -/)[1]; release.title = query.q('.trailer-title', true) || titleString.match(/Trailer: ([\w\s]+) -/)[1];
release.channel = slugify(titleString.match(/([\w\s]+) #\d+$/)[1], ''); release.channel = slugify(titleString.match(/([\w\s]+) #\d+$/)[1], '');
const siteKey = siteMapBySlug[release.channel]; const siteKey = siteMapBySlug[release.channel];
release.shootId = `${siteKey} ${episode}`; release.shootId = `${siteKey} ${episode}`;
release.description = query.q('p.card-text', true); release.description = query.q('p.card-text, h5.heavy + p', true);
// order not reliable, get keys // order not reliable, get keys
const detailElsByKey = query.all('.card-body h4.card-title').reduce((acc, rowEl) => ({ const detailElsByKey = query.all('.card-body h4.card-title, .video-summary h5').reduce((acc, rowEl) => ({
...acc, ...acc,
[slugify(rowEl.textContent.match(/(\w+):/)?.[1])]: rowEl, [slugify(rowEl?.textContent.match(/(\w+):/)?.[1])]: rowEl,
}), {}); }), {});
release.date = query.date(detailElsByKey.published, null, 'YYYY-MM-DD'); release.date = query.date(detailElsByKey.published, null, 'YYYY-MM-DD');
release.duration = query.dur(detailElsByKey.episode); release.duration = query.dur(detailElsByKey.episode);
release.actors = query.all(detailElsByKey.starring, 'a', true); release.actors = query.all(detailElsByKey.starring, 'a', true);
const posterPrefix = html.indexOf('poster:');
const poster = query.img('.trailer-poster') || html.slice(html.indexOf('http', posterPrefix), html.indexOf('.jpg', posterPrefix) + 4);
if (poster) {
if (baseRelease?.poster) {
release.photos = [poster, ...(baseRelease.photos || [])];
} else {
release.poster = poster;
}
}
const token = query.meta('name=_token'); const token = query.meta('name=_token');
const trailerInfoUrl = `${origin}/episodes/trailer/sources/${release.entryId}?type=trailer`; const trailerInfoUrl = `${origin}/episodes/trailer/sources/${release.entryId}?type=trailer`;
const trailerInfoRes = await http.post(trailerInfoUrl, null, { const trailerInfoRes = await http.post(trailerInfoUrl, null, {
@ -93,17 +109,6 @@ async function scrapeScene({ query, html }, url, baseRelease) {
})); }));
} }
const posterPrefix = html.indexOf('poster:');
const poster = html.slice(html.indexOf('http', posterPrefix), html.indexOf('.jpg', posterPrefix) + 4);
if (poster) {
if (baseRelease?.poster) {
release.photos = [poster];
} else {
release.poster = poster;
}
}
return release; return release;
} }
@ -128,23 +133,21 @@ function scrapeProfile({ query }) {
return profile; return profile;
} }
async function fetchLatest(site, page = 1) { async function fetchLatest(channel, page = 1) {
const url = `https://kellymadison.com/episodes/search?page=${page}`; // TLS issues with teenfidelity.com, same overview on all sites const url = `${channel.url}/episodes/search?page=${page}`; // TLS issues with teenfidelity.com, same overview on all sites
const res = await http.get(url, { const res = await http.get(url, {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
}); });
if (res.ok && res.body.status === 'success') { if (res.ok && res.body.status === 'success') {
return scrapeLatest(qu.extractAll(res.body.html, '.episode'), site); return scrapeLatest(qu.extractAll(res.body.html, '.episode, .ep'), channel);
} }
return res.status; return res.status;
} }
async function fetchScene(url, channel, baseRelease) { async function fetchScene(url, channel, baseRelease) {
const { pathname } = new URL(url); const res = await qu.get(url, null, {
const res = await qu.get(`https://www.kellymadison.com${pathname}`, null, {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
}); });