Added Pascal's Subsluts affiliate.

This commit is contained in:
DebaucheryLibrarian
2026-03-20 01:59:22 +01:00
parent 7e227a4ea5
commit a7df43eb55
6 changed files with 666 additions and 43 deletions

View File

@@ -14,8 +14,10 @@ function scrapeAll(months, channel, year) {
return unprint.initAll(scenes).map(({ query }) => {
const release = {};
release.url = query.url('a.video-pop-up', { origin: `${channel.origin}/submissive/` });
release.entryId = new URL(release.url).searchParams.get('id');
const videoUrl = query.url('a.video-pop-up', { origin: `${channel.origin}/submissive/` });
release.entryId = new URL(videoUrl).searchParams.get('id');
release.forceDeep = true;
release.title = query.content('.updates-item-title h4');
@@ -53,20 +55,24 @@ async function fetchLatest(channel, page = 1) {
return res.status;
}
function scrapeScene({ html }, url) {
function scrapeScene({ html }, baseRelease) {
const release = {};
release.entryId = new URL(url).searchParams.get('id');
release.entryId = baseRelease.entryId;
release.trailer = html.match(/file: '(.*)'/)[1];
return release;
}
async function fetchScene(url, channel) {
const res = await unprint.get(url);
async function fetchScene(_url, channel, baseRelease) {
if (!baseRelease.entryId) {
return null;
}
const res = await unprint.get(`${channel.origin}/submissive/player-load.php?id=${baseRelease.entryId}`);
if (res.ok) {
return scrapeScene(res.context, url, channel);
return scrapeScene(res.context, baseRelease);
}
return res.status;