Using brief mode on Insex.

This commit is contained in:
ThePendulum 2020-02-12 04:59:15 +01:00
parent e22b09700d
commit 48b10d0f49
3 changed files with 19 additions and 12 deletions

View File

@ -574,6 +574,11 @@ function getTags(groupsMap) {
alias_for: null, alias_for: null,
group_id: groupsMap.clothing, group_id: groupsMap.clothing,
}, },
{
name: 'live',
slug: 'live',
alias_for: null,
},
{ {
name: 'maid', name: 'maid',
slug: 'maid', slug: 'maid',

View File

@ -1801,7 +1801,7 @@ const sites = [
slug: 'realtimebondage', slug: 'realtimebondage',
name: 'Real Time Bondage', name: 'Real Time Bondage',
url: 'http://www.realtimebondage.com', url: 'http://www.realtimebondage.com',
tags: ['bdsm'], tags: ['bdsm', 'live'],
network: 'insex', network: 'insex',
}, },
{ {

View File

@ -12,7 +12,7 @@ function scrapeLatest(html, site) {
const titleEl = q('.galleryTitleText, .articleTitleText'); const titleEl = q('.galleryTitleText, .articleTitleText');
const [title, ...actors] = titleEl.textContent.split('|'); const [title, ...actors] = titleEl.textContent.split('|');
const date = qd('.articlePostDateText', 'MMM D, YYYY'); const date = qd('.articlePostDateText td', 'MMM D, YYYY');
const url = qu(titleEl, 'a'); const url = qu(titleEl, 'a');
[release.entryId] = url.split('/').slice(-2); [release.entryId] = url.split('/').slice(-2);
@ -22,24 +22,26 @@ function scrapeLatest(html, site) {
release.title = title.trim(); release.title = title.trim();
release.date = date; release.date = date;
} else { } else {
// title should contain date instead // title should contain date instead, not applicable in brief mode
release.title = title.slice(title.indexOf(':') + 1).trim(); release.title = title.slice(title.indexOf(':') + 1).trim();
release.date = fd(title.slice(0, title.indexOf(':')), 'MMM D, YYYY'); release.date = fd(title.slice(0, title.indexOf(':')), 'MMM D, YYYY');
} }
release.actors = actors.map(actor => actor.trim()); release.actors = actors.map(actor => actor.trim());
const description = q('.articleCopyText .articleCopyText', true); const description = q('.articleCopyText', true);
if (description) release.description = description; if (description) release.description = description.slice(0, description.lastIndexOf('('));
const duration = ql('.articleCopyText a:nth-child(2)'); const duration = ql('.articleCopyText a:nth-child(2)');
if (duration) release.duration = duration; if (duration) release.duration = duration;
const poster = qi('a img'); release.likes = parseInt(q('.articlePostDateText td:nth-child(3)', true), 10);
release.poster = [
poster.replace('_thumbnail', ''), const cover = qi('a img');
poster, release.covers = [[
]; cover.replace('_thumbnail', ''),
cover,
]];
return release; return release;
}); });
@ -75,9 +77,9 @@ function scrapeScene({ q, qd, ql, qu, qis, qp, qt }, site) {
} }
async function fetchLatest(site, page = 1) { async function fetchLatest(site, page = 1) {
const url = `${site.url}/scripts/switch_tour.php?page=${page}`; const url = `${site.url}/scripts/switch_tour.php?type=brief&page=${page}`;
const res = await bhttp.get(url, { const res = await bhttp.get(url, {
type: 'gallery', type: 'brief',
page, page,
}); });