From a5fda3e0e9f6453a62f0837eaeec7934b66877c9 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 28 Jan 2026 01:16:02 +0100 Subject: [PATCH] Updated Kink affiliates, WIP Blue Donkey (Meiden van Holland) refactor. --- seeds/02_sites.js | 4 +++ seeds/06_affiliates.js | 42 +++++++++++++++++++++++++++++- src/scrapers/bluedonkeymedia.js | 46 +++++++++++++++------------------ 3 files changed, 66 insertions(+), 26 deletions(-) diff --git a/seeds/02_sites.js b/seeds/02_sites.js index a8aad83f..b02b00a1 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -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', }, diff --git a/seeds/06_affiliates.js b/seeds/06_affiliates.js index 8716f256..8dc0866a 100755 --- a/seeds/06_affiliates.js +++ b/seeds/06_affiliates.js @@ -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', diff --git a/src/scrapers/bluedonkeymedia.js b/src/scrapers/bluedonkeymedia.js index 3b938591..1edfb1bc 100644 --- a/src/scrapers/bluedonkeymedia.js +++ b/src/scrapers/bluedonkeymedia.js @@ -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}`;