From c62a529e76a6d5a1167db23ba34edd0ff363b8eb Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 8 Jul 2024 04:59:28 +0200 Subject: [PATCH] Added Amnesiac (Hentaied) scraper. --- seeds/00_tags.js | 40 ++++++++++++++++++++ seeds/01_networks.js | 5 +++ seeds/02_sites.js | 55 +++++++++++++++++++++++++++ src/scrapers/amnesiac.js | 81 ++++++++++++++++++++++++++++++++++++++++ src/scrapers/scrapers.js | 2 + 5 files changed, 183 insertions(+) create mode 100644 src/scrapers/amnesiac.js diff --git a/seeds/00_tags.js b/seeds/00_tags.js index f800c373..96b3bcd3 100755 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -1227,6 +1227,30 @@ const tags = [ name: 'real orgasm', slug: 'real-orgasm', }, + { + name: 'timestop', + slug: 'timestop', + }, + { + name: 'futanari', + slug: 'futanari', + }, + { + name: 'gore', + slug: 'gore', + }, + { + name: 'tentacle', + slug: 'tentacle', + }, + { + name: 'parasite', + slug: 'parasite', + }, + { + name: 'voodoo', + slug: 'voodoo', + }, ]; const aliases = [ @@ -2495,6 +2519,22 @@ const aliases = [ name: 'outdoor', for: 'outdoors', }, + { + name: 'timefreeze', + for: 'timestop', + }, + { + name: 'freeze', + for: 'timestop', + }, + { + name: 'tentacles', + for: 'tentacle', + }, + { + name: 'parasites', + for: 'parasite', + }, ]; const priorities = [ // higher index is higher priority diff --git a/seeds/01_networks.js b/seeds/01_networks.js index 5ec5d98d..ac80708a 100755 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -127,6 +127,11 @@ const networks = [ url: 'https://amateureuro.com', parent: 'porndoe', }, + { + slug: 'amnesiac', + name: 'Amnesiac', + hasLogo: false, + }, { slug: 'assylum', name: 'Assylum', diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 8a053b76..d954705b 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -635,6 +635,61 @@ const sites = [ }, parent: 'amateurallure', }, + // AMNESIAC + { + name: 'Hentaied', + slug: 'hentaied', + url: 'https://hentaied.com', + tags: ['tentacle'], + parent: 'amnesiac', + }, + { + name: 'Futanari', + slug: 'futanari', + url: 'https://futanari.xxx', + tags: ['futanari'], + parent: 'amnesiac', + }, + { + name: 'Freeze', + slug: 'freeze', + url: 'https://freeze.xxx', + tags: ['timestop'], + parent: 'amnesiac', + }, + { + name: 'Somegore', + slug: 'somegore', + url: 'https://somegore.com', + tags: ['gore'], + parent: 'amnesiac', + }, + { + name: 'Defeated', + slug: 'defeated', + url: 'https://defeatedsexfight.com', + parent: 'amnesiac', + }, + { + name: 'Plants vs Cunts', + slug: 'plantsvscunts', + url: 'https://plantsvscunts.com', + tags: ['tentacle'], + parent: 'amnesiac', + }, + { + name: 'Voodooed', + slug: 'voodooed', + url: 'https://voodooed.com', + tags: ['voodoo'], + parent: 'amnesiac', + }, + { + name: 'Vored', + slug: 'vored', + url: 'https://vored.com', + parent: 'amnesiac', + }, // AMATEUR EURO { name: 'La Cochonne', diff --git a/src/scrapers/amnesiac.js b/src/scrapers/amnesiac.js new file mode 100644 index 00000000..347f4716 --- /dev/null +++ b/src/scrapers/amnesiac.js @@ -0,0 +1,81 @@ +'use strict'; + +const unprint = require('unprint'); + +function scrapeAll(scenes) { + return scenes.map(({ query }) => { + if (query.exists('.crowdfunding-post')) { + return null; + } + + const release = {}; + + release.url = query.url('a'); + release.entryId = new URL(release.url).pathname.split('/')[1]; + + release.title = query.content('.allvideostitle p, .allvideostitle h2'); + + release.actors = query.contents('.tagsmodels a'); + + release.poster = query.sourceSet('.vidcont .attachment-thumbnail'); + release.teaser = query.video('.vidcont video', { attribute: 'data-src' }); + + return release; + }).filter(Boolean); +} + +function scrapeScene({ query }, { url }) { + const release = {}; + + release.entryId = new URL(url).pathname.split('/')[1]; + + release.title = query.content('.title-fav h1'); + release.description = query.contents('.description #fullstory, .title-fav .cont > p').join(' '); + + release.date = query.date('.datesingle', 'MMMM D, YYYY'); + release.duration = query.duration('.duration'); + + release.actors = query.contents('.tagsmodels:not(.director) a'); + release.director = query.content('.director a'); + + release.poster = [ + query.img('.preview .attachment-full'), + query.img('meta[property="og:image"]', { attribute: 'content' }), + ]; + + release.caps = query.all('.gallery a').map((photoEl) => [ + unprint.query.url(photoEl, null), + unprint.query.img(photoEl, 'img'), + ]); + + release.trailer = { + src: query.video('.preview video'), + referer: url, + expectType: { + 'binary/octet-stream': 'video/mp4', + }, + }; + + release.tags = query.contents('.post-categories a'); + + return release; +} + +async function fetchLatest(channel, page = 1) { + const url = `${channel.url}/all-videos/${page}/`; + const res = await unprint.get(url, { selectAll: '.catposts > div:not(.clearfix):not(.flexcont)' }); + + if (res.ok) { + return scrapeAll(res.context, channel); + } + + return res.status; +} + +module.exports = { + fetchLatest, + scrapeScene: { + scraper: scrapeScene, + unprint: true, + }, +}; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index 466a35eb..a48c6efb 100755 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -5,6 +5,7 @@ const archangel = require('./archangel'); const assylum = require('./assylum'); const amateurallure = require('./amateurallure'); const americanpornstar = require('./americanpornstar'); +const amnesiac = require('./amnesiac'); const badoink = require('./badoink'); const bamvisions = require('./bamvisions'); const bang = require('./bang'); @@ -82,6 +83,7 @@ const scrapers = { amateurallure, americanpornstar, amateureuro: porndoe, + amnesiac, archangel, asiam: modelmedia, assylum,