From 7386aa9da7d734335be7c3a204ad5cb10d4234dd Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 1 Feb 2026 22:57:20 +0100 Subject: [PATCH] Fixed banner seed. --- seeds/02_sites.js | 14 +++++++++----- seeds/06_affiliates.js | 9 +++++++-- src/scrapers/karups.js | 4 ++-- src/scrapers/littlecapricedreams.js | 2 ++ 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/seeds/02_sites.js b/seeds/02_sites.js index e243774d..ce9802c1 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -7431,6 +7431,7 @@ const sites = [ { name: 'Caprice Casting', slug: 'capricecasting', + delete: true, url: 'https://www.littlecaprice-dreams.com/collection/caprice-casting', parent: 'littlecapricedreams', }, @@ -7447,9 +7448,10 @@ const sites = [ parent: 'littlecapricedreams', }, { - name: 'Nassty', - slug: 'nassty', - url: 'https://www.littlecaprice-dreams.com/collection/nassty', + name: 'NasstyX', + slug: 'nasstyx', + rename: 'nassty', + url: 'https://www.littlecaprice-dreams.com/collection/nasstyx', parent: 'littlecapricedreams', }, { @@ -7467,6 +7469,7 @@ const sites = [ { name: 'Public Sex', slug: 'publicsex', + delete: true, url: 'https://www.littlecaprice-dreams.com/collection/public-sex', parent: 'littlecapricedreams', }, @@ -7479,6 +7482,7 @@ const sites = [ { name: 'Sex Lessons', slug: 'sexlessons', + delete: true, url: 'https://www.littlecaprice-dreams.com/collection/sexlessons', parent: 'littlecapricedreams', }, @@ -7491,14 +7495,14 @@ const sites = [ { name: 'Little Caprice VR', slug: 'littlecapricevr', - url: 'https://www.littlecaprice-dreams.com/collection/virtual-reality-little-caprice', + url: 'https://www.littlecaprice-dreams.com/collection/virtual-reality', tags: ['vr'], parent: 'littlecapricedreams', }, { name: 'We Cum To You', slug: 'wecumtoyou', - url: 'https://www.littlecaprice-dreams.com/collection/wecumtoyou-swingers', + url: 'https://www.littlecaprice-dreams.com/collection/wecumtoyou', tags: ['swinging', 'orgy'], parent: 'littlecapricedreams', }, diff --git a/seeds/06_affiliates.js b/seeds/06_affiliates.js index 7934e747..add45c56 100755 --- a/seeds/06_affiliates.js +++ b/seeds/06_affiliates.js @@ -996,6 +996,10 @@ async function scan(dir) { } function getAffiliateId(affiliate) { + if (!affiliate) { + return null; + } + if (affiliate.id) { return affiliate.id; } @@ -1030,14 +1034,15 @@ exports.seed = async (knex) => { network: network === 'banners' ? channel : network, channel: network === 'banners' ? null : channel, affiliateId, - affiliate: affiliate?.id, + affiliate: getAffiliateId(affiliate), banner, width: Number(width), height: Number(height), type, tags, }; - }).filter((banner) => !!banner.affiliate); + // }).filter((banner) => !!banner.affiliate); + }); await Promise.all([ knex('campaigns').delete(), diff --git a/src/scrapers/karups.js b/src/scrapers/karups.js index fb6f949c..499f04ef 100755 --- a/src/scrapers/karups.js +++ b/src/scrapers/karups.js @@ -24,7 +24,7 @@ function scrapeAll(scenes) { const poster = query.img('.thumb img'); - if (poster) { + if (poster && /\.\w{3,4}$/.test(poster)) { // missing poster points to https://media.karups.com/thumbs_pg/ release.poster = Array.from(new Set([ poster.replace('.jpg', '-feat_lg.jpg'), poster, @@ -68,7 +68,7 @@ function scrapeScene({ query }, { url }) { // videos and photos seem to be removed, query educated guess just in case const poster = query.poster('.video-player video') || query.img('.video-poster img'); - if (poster) { + if (poster && /\.\w{3,4}$/.test(poster)) { // missing poster points to https://media.karups.com/thumbs_pg/ release.poster = Array.from(new Set([ poster, poster.replace('-feat_lg', ''), diff --git a/src/scrapers/littlecapricedreams.js b/src/scrapers/littlecapricedreams.js index 1ab71126..4e11bc6e 100755 --- a/src/scrapers/littlecapricedreams.js +++ b/src/scrapers/littlecapricedreams.js @@ -140,6 +140,8 @@ async function scrapeScene({ query }, { url, include }) { }; } + console.log(release.trailer); + const channelSlug = slugify(query.content('.project-tags a[href*="collection/"]'), ''); release.channel = channelMap[channelSlug] || channelSlug;