Updated Kink affiliates, WIP Blue Donkey (Meiden van Holland) refactor.

This commit is contained in:
DebaucheryLibrarian 2026-01-28 01:16:02 +01:00
parent 950048df9a
commit a5fda3e0e9
3 changed files with 66 additions and 26 deletions

View File

@ -2275,6 +2275,8 @@ const sites = [
frontend: 1,
languages: ['nl', 'en'],
secret: 'HwzAace4HlS1W9h4YdPLhG6OzZjFCmIy6LUYhfv3',
apiPath: '/mvh',
credentials: '1-3dc13a570ff233c78a3fef0b887ad44f279683fe036ccbac8e494bb89422ed77-mvh',
},
parent: 'bluedonkeymedia',
},
@ -2287,6 +2289,8 @@ const sites = [
frontend: 3,
languages: ['be'],
secret: 'DYRQhSPLpGcTaPumqyvXT3KvEvTQ2LUKmpvYdUjX',
apiPath: '/vv',
credentials: '1-67ed9d361dc9f94db8ca8e8663f5a8c32b4ad9b78d0c2bf92f36dbef4630fbaf-vv',
},
parent: 'bluedonkeymedia',
},

View File

@ -307,13 +307,53 @@ const affiliates = [
url: 'https://register.shesbrandnew.com/track/MzAwMDA5NzkuMy42MC4xNzMuMC4wLjAuMC4w',
comment: 'rev share',
},
// etc
// kink
{
id: 'kink',
network: 'kink',
url: 'https://www.c4cgmn8trk.com/G483KW96H/225JFQ',
comment: '50%',
parameters: {
dynamicScene: 'https://www.c4cgmn8trk.com/G483KW96H/225JFQ/?uid=18&ef_page={scenePath}',
dynamicEntity: 'https://www.c4cgmn8trk.com/G483KW96H/225JFQ/?uid=18&ef_page={entityPath}',
prefixSlash: false,
},
},
{
id: 'kinktrans',
channel: 'kinktrans',
url: 'https://www.c4cgmn8trk.com/G483KW96H/XCQZJ/',
comment: '50%',
parameters: {
dynamicScene: 'https://www.c4cgmn8trk.com/G483KW96H/XCQZJ/?uid=21&ef_page={scenePath}',
dynamicEntity: 'https://www.c4cgmn8trk.com/G483KW96H/XCQZJ/?uid=21&ef_page={entityPath}',
prefixSlash: false,
},
},
{
id: 'kinkmen',
network: 'kinkmen',
url: 'https://www.c4cgmn8trk.com/G483KW96H/SL1HB/',
comment: '50%',
parameters: {
dynamicScene: 'https://www.c4cgmn8trk.com/G483KW96H/SL1HB/?uid=20&ef_page={scenePath}',
dynamicEntity: 'https://www.c4cgmn8trk.com/G483KW96H/SL1HB/?uid=20&ef_page={entityPath}',
prefixSlash: false,
},
},
{
id: 'kinkvr',
channel: 'kinkvr',
url: 'https://www.c4cgmn8trk.com/G483KW96H/PS824/',
comment: '50%',
parameters: {
// no dedicated scene pages, use Kink main
dynamicScene: 'https://www.c4cgmn8trk.com/G483KW96H/225JFQ/?uid=18&ef_page={scenePath}',
dynamicEntity: 'https://www.c4cgmn8trk.com/G483KW96H/225JFQ/?uid=18&ef_page={entityPath}',
prefixSlash: false,
},
},
// etc
{
id: 'bang',
network: 'bang',

View File

@ -35,6 +35,7 @@ function scrapeAll(scenes, channel, context) {
return scenes.reduce((acc, scene) => {
const release = {};
/*
release.entryId = scene.id;
release.url = getSceneUrl(channel, scene.attributes.slug, scene.id);
release.date = unprint.extractDate(scene.attributes.product.active_from, 'D/M/YY');
@ -50,10 +51,6 @@ function scrapeAll(scenes, channel, context) {
release.poster = `https://cdndo.sysero.nl${scene.attributes.images.thumb?.[0]?.path || context.images[scene.id]}`;
}
if (scene.attributes.videos.trailer?.[0]) {
release.trailer = async () => fetchTrailer(scene.id, scene.attributes.videos.trailer[0].id, channel, context.credentials);
}
if (teaserPath) {
release.teaser = `https://cdndo.sysero.nl${teaserPath}`;
}
@ -65,6 +62,10 @@ function scrapeAll(scenes, channel, context) {
// all MVH sites list the entire network, but we want to store Flemish scenes under Vurig Vlaanderen
return { ...acc, unextracted: [...acc.unextracted, release] };
}
*/
console.log(scene);
console.log(release);
return { ...acc, scenes: [...acc.scenes, release] };
}, {
@ -73,6 +74,22 @@ function scrapeAll(scenes, channel, context) {
});
}
async function fetchLatest(channel, page, context) {
// query seems to break if any component is left out or even moved
const res = await http.get(`https://apiv2.sysero.nl/api${context.parameters.apiPath}/resources/nl?query=(content:videos,types:(0:video),sort:(published_at:DESC),filters:(active:1,status:published),pagination:(page:${page},per_page:20),include:((resources:(filters:((types:(0:category),status:published)),images:(filters:((types:(0:thumb))))),images:(filters:((types:(0:cover,1:home_cover,2:thumb,3:cover_thumb)))),clips:(),videos:(),categories:())))`, {
headers: {
Origin: channel.origin,
Credentials: context.parameters.credentials,
},
});
if (res.ok && res.body.data) {
return scrapeAll(res.body.data, channel, context);
}
return res.status;
}
function getCredentials(channel) {
const now = Math.floor(Date.now() / 1000);
@ -181,27 +198,6 @@ function scrapeScene({ _query, window }, context) {
return null;
}
async function fetchLatest(channel, page, context) {
const credentials = getCredentials(channel);
const res = await http.get(`https://api.sysero.nl/videos?page=${page}&count=20&type=video&include=images:types(thumb|thumb_mobile),categories,clips&filter[status]=published&filter[products]=1%2C2&sort[published_at]=DESC&frontend=${channel.parameters.frontend}`, {
headers: {
Origin: channel.url,
Credentials: credentials,
},
});
if (res.ok && res.body.data) {
const tags = Object.fromEntries(res.body.included?.filter((item) => item.type === 'category').map((item) => [item.id, item.attributes.slug]) || []);
const images = Object.fromEntries(res.body.included?.filter((item) => item.type === 'image' && item.attributes.types === 'thumb').map((item) => [item.id, item.attributes.path]) || []);
const clips = Object.fromEntries(res.body.included?.filter((item) => item.type === 'clip').map((item) => [item.id, item.attributes.path]) || []);
return scrapeAll(res.body.data, channel, { ...context, images, clips, tags, credentials });
}
return res.status;
}
async function fetchProfile(actor, { entity }) {
const credentials = getCredentials(entity);
const url = `${entity.url}/modellen/${actor.slug}`;