Fixed banner seed.

This commit is contained in:
DebaucheryLibrarian 2026-02-01 22:57:20 +01:00
parent 8438d2e3b3
commit 7386aa9da7
4 changed files with 20 additions and 9 deletions

View File

@ -7431,6 +7431,7 @@ const sites = [
{ {
name: 'Caprice Casting', name: 'Caprice Casting',
slug: 'capricecasting', slug: 'capricecasting',
delete: true,
url: 'https://www.littlecaprice-dreams.com/collection/caprice-casting', url: 'https://www.littlecaprice-dreams.com/collection/caprice-casting',
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
@ -7447,9 +7448,10 @@ const sites = [
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
{ {
name: 'Nassty', name: 'NasstyX',
slug: 'nassty', slug: 'nasstyx',
url: 'https://www.littlecaprice-dreams.com/collection/nassty', rename: 'nassty',
url: 'https://www.littlecaprice-dreams.com/collection/nasstyx',
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
{ {
@ -7467,6 +7469,7 @@ const sites = [
{ {
name: 'Public Sex', name: 'Public Sex',
slug: 'publicsex', slug: 'publicsex',
delete: true,
url: 'https://www.littlecaprice-dreams.com/collection/public-sex', url: 'https://www.littlecaprice-dreams.com/collection/public-sex',
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
@ -7479,6 +7482,7 @@ const sites = [
{ {
name: 'Sex Lessons', name: 'Sex Lessons',
slug: 'sexlessons', slug: 'sexlessons',
delete: true,
url: 'https://www.littlecaprice-dreams.com/collection/sexlessons', url: 'https://www.littlecaprice-dreams.com/collection/sexlessons',
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
@ -7491,14 +7495,14 @@ const sites = [
{ {
name: 'Little Caprice VR', name: 'Little Caprice VR',
slug: 'littlecapricevr', slug: 'littlecapricevr',
url: 'https://www.littlecaprice-dreams.com/collection/virtual-reality-little-caprice', url: 'https://www.littlecaprice-dreams.com/collection/virtual-reality',
tags: ['vr'], tags: ['vr'],
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },
{ {
name: 'We Cum To You', name: 'We Cum To You',
slug: 'wecumtoyou', slug: 'wecumtoyou',
url: 'https://www.littlecaprice-dreams.com/collection/wecumtoyou-swingers', url: 'https://www.littlecaprice-dreams.com/collection/wecumtoyou',
tags: ['swinging', 'orgy'], tags: ['swinging', 'orgy'],
parent: 'littlecapricedreams', parent: 'littlecapricedreams',
}, },

View File

@ -996,6 +996,10 @@ async function scan(dir) {
} }
function getAffiliateId(affiliate) { function getAffiliateId(affiliate) {
if (!affiliate) {
return null;
}
if (affiliate.id) { if (affiliate.id) {
return affiliate.id; return affiliate.id;
} }
@ -1030,14 +1034,15 @@ exports.seed = async (knex) => {
network: network === 'banners' ? channel : network, network: network === 'banners' ? channel : network,
channel: network === 'banners' ? null : channel, channel: network === 'banners' ? null : channel,
affiliateId, affiliateId,
affiliate: affiliate?.id, affiliate: getAffiliateId(affiliate),
banner, banner,
width: Number(width), width: Number(width),
height: Number(height), height: Number(height),
type, type,
tags, tags,
}; };
}).filter((banner) => !!banner.affiliate); // }).filter((banner) => !!banner.affiliate);
});
await Promise.all([ await Promise.all([
knex('campaigns').delete(), knex('campaigns').delete(),

View File

@ -24,7 +24,7 @@ function scrapeAll(scenes) {
const poster = query.img('.thumb img'); 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([ release.poster = Array.from(new Set([
poster.replace('.jpg', '-feat_lg.jpg'), poster.replace('.jpg', '-feat_lg.jpg'),
poster, poster,
@ -68,7 +68,7 @@ function scrapeScene({ query }, { url }) {
// videos and photos seem to be removed, query educated guess just in case // 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'); 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([ release.poster = Array.from(new Set([
poster, poster,
poster.replace('-feat_lg', ''), poster.replace('-feat_lg', ''),

View File

@ -140,6 +140,8 @@ async function scrapeScene({ query }, { url, include }) {
}; };
} }
console.log(release.trailer);
const channelSlug = slugify(query.content('.project-tags a[href*="collection/"]'), ''); const channelSlug = slugify(query.content('.project-tags a[href*="collection/"]'), '');
release.channel = channelMap[channelSlug] || channelSlug; release.channel = channelMap[channelSlug] || channelSlug;