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,
group_id: groupsMap.clothing,
},
{
name: 'live',
slug: 'live',
alias_for: null,
},
{
name: 'maid',
slug: 'maid',

View File

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

View File

@ -12,7 +12,7 @@ function scrapeLatest(html, site) {
const titleEl = q('.galleryTitleText, .articleTitleText');
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');
[release.entryId] = url.split('/').slice(-2);
@ -22,24 +22,26 @@ function scrapeLatest(html, site) {
release.title = title.trim();
release.date = date;
} 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.date = fd(title.slice(0, title.indexOf(':')), 'MMM D, YYYY');
}
release.actors = actors.map(actor => actor.trim());
const description = q('.articleCopyText .articleCopyText', true);
if (description) release.description = description;
const description = q('.articleCopyText', true);
if (description) release.description = description.slice(0, description.lastIndexOf('('));
const duration = ql('.articleCopyText a:nth-child(2)');
if (duration) release.duration = duration;
const poster = qi('a img');
release.poster = [
poster.replace('_thumbnail', ''),
poster,
];
release.likes = parseInt(q('.articlePostDateText td:nth-child(3)', true), 10);
const cover = qi('a img');
release.covers = [[
cover.replace('_thumbnail', ''),
cover,
]];
return release;
});
@ -75,9 +77,9 @@ function scrapeScene({ q, qd, ql, qu, qis, qp, qt }, site) {
}
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, {
type: 'gallery',
type: 'brief',
page,
});