From 54dbea659ac3a36f9c6e18ce17c5933da0813154 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Fri, 4 Aug 2023 21:43:57 +0200 Subject: [PATCH] Added missing image fallbacks to legacy Aziani scraper. --- seeds/00_tags.js | 84 ++++++++++++++++++++++++++++++++++++++++ seeds/02_sites.js | 6 +++ seeds/03_studios.js | 27 ++++++++++++- src/scrapers/aziani.js | 12 +++--- src/scrapers/scrapers.js | 3 ++ 5 files changed, 126 insertions(+), 6 deletions(-) diff --git a/seeds/00_tags.js b/seeds/00_tags.js index e70397c2..1974a26c 100755 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -2317,6 +2317,90 @@ const aliases = [ name: 'sm', for: 'bdsm', }, + { + name: 'bem dotado', + for: 'big-dick', + }, + { + name: 'boquetes', + for: 'blowjob', + }, + { + name: 'boquete', + for: 'blowjob', + }, + { + name: 'bunda grande', + for: 'big-butt', + }, + { + name: 'loiras', + for: 'blonde', + }, + { + name: 'loira', + for: 'blonde', + }, + { + name: 'suruba', + for: 'orgy', + }, + { + name: 'amador', + for: 'amateur', + }, + { + name: 'amadores', + for: 'amateur', + }, + { + name: 'dupla penetração', + for: 'dp', + }, + { + name: 'incesto', + for: 'family', + }, + { + name: 'morenas', + for: 'brunette', + }, + { + name: 'morena', + for: 'brunette', + }, + { + name: 'ruivas', + for: 'redhead', + }, + { + name: 'ruiva', + for: 'redhead', + }, + { + name: 'tatuadas', + for: 'tattoos', + }, + { + name: 'travestis', + for: 'transsexual', + }, + { + name: 'travesti', + for: 'transsexual', + }, + { + name: 'ninfetas', + for: 'teen', + }, + { + name: 'coroa', + for: 'milf', + }, + { + name: 'coroas', + for: 'milf', + }, ]; const priorities = [ // higher index is higher priority diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 82d2c682..6e0a7795 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -11111,6 +11111,12 @@ const sites = [ siteId: 20, }, }, + // TESTE DE FUDELIDADE + { + name: 'Teste de Fudelidade', + slug: 'testedefudelidade', + url: 'https://testedefudelidade.com', + }, // TOKYO HOT { name: 'Tokyo Hot', diff --git a/seeds/03_studios.js b/seeds/03_studios.js index 334bab4a..d299c563 100755 --- a/seeds/03_studios.js +++ b/seeds/03_studios.js @@ -5204,6 +5204,30 @@ const studios = [ parent: 'analvids', description: 'Producing raw amateur porn leaded by Bluff, the creator, filmmaker and photographer. The models are from a circle of friends that creates and share all together. Through webcam nights, professionally made productions or from spontaneous projects, the general desire always was to produce high quality amateur porn. A wide variety of content is offered. *No custom video request *all models are 18+ and consented to appear in the photos/videos.', }, + // TESTE DE FUDELIDADE + { + name: 'Teste de Fudelidade Exclusivo', + slug: 'testedefudelidadeexclusivo', + parent: 'testedefudelidade', + }, + { + name: 'Teste de Fudelidade - Produção Exclusiva', + slug: 'testedefudelidadeproducaoexclusiva', + parent: 'testedefudelidade', + showcased: true, + }, + { + name: 'Gostosas Video', + slug: 'gostosasvideo', + parent: 'testedefudelidade', + showcased: true, + }, + { + name: 'Brad Montana', + slug: 'bradmontana', + parent: 'testedefudelidade', + showcased: true, + }, ].map((studio) => (studio.parent === 'analvids' && studio.showcased !== true ? { ...studio, @@ -5215,6 +5239,7 @@ const studios = [ exports.seed = (knex) => Promise.resolve() .then(async () => { const networks = await knex('entities') + .whereIn('type', ['network', 'channel']) .whereIn('slug', studios.map((studio) => studio.parent)); const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {}); @@ -5226,7 +5251,7 @@ exports.seed = (knex) => Promise.resolve() type: 'studio', parent_id: networksMap[studio.parent], has_logo: studio.hasLogo || false, - showcased: studio.showcased, + showcased: typeof studio.showcased === 'boolean' ? studio.showcased : true, })); return upsert('entities', studiosWithNetwork, ['slug', 'type'], knex); diff --git a/src/scrapers/aziani.js b/src/scrapers/aziani.js index d86f2361..4a56f77a 100755 --- a/src/scrapers/aziani.js +++ b/src/scrapers/aziani.js @@ -24,17 +24,19 @@ function scrapeAll(scenes, site) { return scenes.map(({ qu }) => { const release = {}; - release.entryId = qu.q('.stdimage', 'id', true).match(/set-target-(\d+)/)[1]; release.url = qu.url('a'); release.title = qu.q('h5 a', true); release.date = qu.date('.icon-calendar + strong', 'MM/DD/YYYY'); - release.actors = qu.q('h3', true).replace(/featuring:\s?/i, '').split(', '); + release.entryId = qu.q('.stdimage', 'id', true)?.match(/set-target-(\d+)/)?.[1] || new URL(release.url).pathname.match(/trailers\/(.*).html/)?.[1]; + + release.actors = qu.q('h3', true).replace(/featuring:\s?/i, '').split(', ').filter(Boolean); const photoCount = qu.q('.stdimage', 'cnt'); + [release.poster, ...release.photos] = Array.from({ length: Number(photoCount) }, (value, index) => { - const source = qu.img('.stdimage', `src${index}_1x`, site.url); + const source = qu.img('.stdimage', `src${index}_1x`, { origin: site.url }); return getFallbacks(source); }); @@ -46,7 +48,7 @@ function scrapeAll(scenes, site) { function scrapeScene({ html, qu }, url, channel) { const release = { url }; - release.entryId = qu.q('.stdimage', 'id', true).match(/set-target-(\d+)/)[1]; + release.entryId = qu.q('.stdimage', 'id', true)?.match(/set-target-(\d+)/)?.[1] || new URL(url).pathname.match(/trailers\/(.*).html/)?.[1]; release.title = qu.q('h2', true); release.description = qu.q('p', true); @@ -63,7 +65,7 @@ function scrapeScene({ html, qu }, url, channel) { release.duration = qu.dur('.video_categories + p'); release.poster = getFallbacks(qu.img('a img')) || getFallbacks(qu.img('#preview video', 'poster', { origin: channel.url })); - release.caps = qu.imgs('.featured-video img', 'src0_1x', { origin: channel.url }).map((source) => getFallbacks(source)); + release.caps = qu.imgs('.featured-video img', 'src0_1x', { origin: channel.url }).map((source) => getFallbacks(source)).filter(Boolean); release.trailer = qu.video('#preview source'); diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index 3f17d06c..c0872e9e 100755 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -62,6 +62,7 @@ const spizoo = require('./spizoo'); const teamskeet = require('./teamskeet'); const teencoreclub = require('./teencoreclub'); const teenmegaworld = require('./teenmegaworld'); +const testedefudelidade = require('./testedefudelidade'); const tokyohot = require('./tokyohot'); const topwebmodels = require('./topwebmodels'); const traxxx = require('./traxxx'); @@ -156,6 +157,7 @@ const scrapers = { teencoreclub, teenmegaworld, teamskeet, + testedefudelidade, tokyohot, topwebmodels, transbella: porndoe, @@ -296,6 +298,7 @@ const scrapers = { teamskeet, teencoreclub, teenmegaworld, + testedefudelidade, thatsitcomshow: nubiles, tokyohot, topwebmodels,