From 596597e0e30e0e9997c7a3ba5d884586367d8ffe Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 17 Aug 2024 02:33:59 +0200 Subject: [PATCH] Added MissaX. --- config/default.js | 1 + seeds/01_networks.js | 5 +++ seeds/02_sites.js | 13 ++++++ src/scrapers/missax.js | 94 ++++++++++++++++++++++++++++++++++++++++ src/scrapers/scrapers.js | 4 ++ 5 files changed, 117 insertions(+) create mode 100644 src/scrapers/missax.js diff --git a/config/default.js b/config/default.js index 46b49235..75d98ce0 100755 --- a/config/default.js +++ b/config/default.js @@ -253,6 +253,7 @@ module.exports = { 'porncz', 'czechav', 'littlecapricedreams', + 'missyx', 'gangbangcreampie', 'gloryholesecrets', 'aziani', diff --git a/seeds/01_networks.js b/seeds/01_networks.js index f8102952..9af86d06 100755 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -511,6 +511,11 @@ const networks = [ parentSession: false, }, }, + { + slug: 'missax', + name: 'MissaX', + url: 'https://missax.com', + }, { slug: 'modelmedia', name: 'Model Media', diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 06896f03..b76da972 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -6275,6 +6275,19 @@ const sites = [ }, parent: 'milehighmedia', }, + // MISSA X + { + slug: 'missax', + name: 'MissaX', + url: 'https://missax.com', + parent: 'missax', + }, + { + slug: 'allherluv', + name: 'All Her Luv', + url: 'https://allherluv.com', + parent: 'missax', + }, // MODEL MEDIA { slug: 'delphine', diff --git a/src/scrapers/missax.js b/src/scrapers/missax.js new file mode 100644 index 00000000..eb2ff8a3 --- /dev/null +++ b/src/scrapers/missax.js @@ -0,0 +1,94 @@ +'use strict'; + +const unprint = require('unprint'); + +const slugify = require('../utils/slugify'); + +function scrapeAll(scenes) { + return scenes.map(({ query }) => { + const release = {}; + + release.url = query.url('.photo-thumb_body > a'); + release.entryId = new URL(release.url).pathname.match(/\/trailers\/([\w-]+).html/)[1].toLowerCase(); + + release.title = query.content('.thumb-title'); + + release.actors = query.all('.model-name a').map((actorEl) => ({ + name: unprint.query.content(actorEl), + url: unprint.query.url(actorEl, null), + })); + + release.poster = Array.from({ length: 4 }, (item, index) => query.img('img.mainThumb', { attribute: `src0_${4 - index}x` })); + + return release; + }); +} + +function scrapeScene({ query, html }, { url, entity }) { + const release = {}; + + release.entryId = new URL(url).pathname.match(/\/trailers\/([\w-]+).html/)[1].toLowerCase(); + + release.title = query.content('.raiting-section__title'); + release.description = query.contents('p.text, p.text ~ p').map((p) => p.trim()).join('\n\n'); + + release.date = query.date('.dvd-scenes__data', 'MM/DD/YYYY'); + release.duration = query.duration('.dvd-scenes__data'); + + release.actors = query.all('.dvd-scenes__data a[href*="/models"]').map((actorEl) => ({ + name: unprint.query.content(actorEl), + url: unprint.query.url(actorEl, null), + })); + + release.tags = query.contents('.dvd-scenes__data a[href*="/categories"]'); + + release.poster = Array.from({ length: 4 }, (item, index) => query.img('img.update_thumb', { attribute: `src0_${4 - index}x` })); + release.trailer = unprint.prefixUrl(html.match(/src="(\/trailers\/\w+\.mp4)"/)?.[1], entity.url); + + return release; +} + +function scrapeProfile({ query }) { + const profile = {}; + + profile.description = query.contents('p.text, p.text ~ p')?.map((p) => p.trim()).join('\n\n'); + profile.avatar = Array.from({ length: 3 }, (item, index) => query.img('.bio-img img', { attribute: `src0_${3 - index}x` })); + + return profile; +} + +async function fetchLatest(channel, page = 1) { + const url = `${channel.url}/tour/categories/movies_${page}_d.html`; + const res = await unprint.get(url, { selectAll: '.tab-content .video-thumb' }); + + if (res.ok) { + return scrapeAll(res.context, channel); + } + + return res.status; +} + +async function fetchProfile({ name }, entity) { + const res = await unprint.get(`${entity.url}/tour/models/${name.replace(/\s+/, '')}.html`); + + if (res.ok) { + return scrapeProfile(res.context, entity); + } + + const slugRes = await unprint.get(`${entity.url}/tour/models/${slugify(name, '-')}.html`); + + if (slugRes.ok) { + return scrapeProfile(slugRes.context, entity); + } + + return slugRes.status; +} + +module.exports = { + fetchLatest, + fetchProfile, + scrapeScene: { + scraper: scrapeScene, + unprint: true, + }, +}; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index 0a9108e9..d7e1b6ab 100755 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -43,6 +43,7 @@ const loveherfilms = require('./loveherfilms'); const bluedonkeymedia = require('./bluedonkeymedia'); const mikeadriano = require('./mikeadriano'); const aylo = require('./aylo'); +const missax = require('./missax'); const naughtyamerica = require('./naughtyamerica'); const newsensations = require('./newsensations'); const nubiles = require('./nubiles'); @@ -134,6 +135,7 @@ const scrapers = { mamacitaz: porndoe, mariskax, mikeadriano, + missax, aylo, mylf: teamskeet, naughtyamerica, @@ -179,6 +181,7 @@ const scrapers = { '21sextury': gamma, adultempire, allanal: mikeadriano, + allherluv: missax, amateureuro: porndoe, americanpornstar, analbbc: fullpornnetwork, @@ -264,6 +267,7 @@ const scrapers = { milehighmedia: aylo, milfy: vixen, milfvr: wankzvr, + missax, mofos: aylo, mylf: teamskeet, mugfucked: fullpornnetwork,