diff --git a/assets/js/entities/actions.js b/assets/js/entities/actions.js index 140657cc5..7abcdbfb0 100644 --- a/assets/js/entities/actions.js +++ b/assets/js/entities/actions.js @@ -178,7 +178,7 @@ function initEntitiesActions(store, router) { $entitySlugs: [String!] = [] ) { entities( - orderBy: NAME_ASC + orderBy: SLUG_ASC filter: { or: [ { diff --git a/config/default.js b/config/default.js index 68068c990..39253a885 100644 --- a/config/default.js +++ b/config/default.js @@ -113,6 +113,7 @@ module.exports = { ], '21sextury', 'julesjordan', + 'dorcelclub', 'bang', 'pervcity', 'kink', @@ -153,20 +154,22 @@ module.exports = { 'pervertgallery', 'povperverts', ], + 'pascalssubsluts', 'kellymadison', 'private', 'ddfnetwork', 'bangbros', 'hitzefrei', - [ - 'silverstonedvd', - 'silviasaint', - ], 'porncz', + 'czechav', 'gangbangcreampie', 'gloryholesecrets', 'aziani', 'legalporno', + [ + 'silverstonedvd', + 'silviasaint', + ], 'score', 'boobpedia', 'pornhub', diff --git a/public/img/logos/dorcel/dorcel.png b/public/img/logos/dorcel/dorcel.png new file mode 100644 index 000000000..705b20ef0 Binary files /dev/null and b/public/img/logos/dorcel/dorcel.png differ diff --git a/public/img/logos/dorcel/dorcelclub.png b/public/img/logos/dorcel/dorcelclub.png new file mode 100644 index 000000000..affc652b4 Binary files /dev/null and b/public/img/logos/dorcel/dorcelclub.png differ diff --git a/public/img/logos/dorcel/favicon.png b/public/img/logos/dorcel/favicon.png new file mode 100644 index 000000000..78720d11b Binary files /dev/null and b/public/img/logos/dorcel/favicon.png differ diff --git a/public/img/logos/dorcel/lazy/dorcel.png b/public/img/logos/dorcel/lazy/dorcel.png new file mode 100644 index 000000000..12d8eaaf2 Binary files /dev/null and b/public/img/logos/dorcel/lazy/dorcel.png differ diff --git a/public/img/logos/dorcel/lazy/dorcelclub.png b/public/img/logos/dorcel/lazy/dorcelclub.png new file mode 100644 index 000000000..1c5c6e610 Binary files /dev/null and b/public/img/logos/dorcel/lazy/dorcelclub.png differ diff --git a/public/img/logos/dorcel/lazy/network.png b/public/img/logos/dorcel/lazy/network.png new file mode 100644 index 000000000..202753fcc Binary files /dev/null and b/public/img/logos/dorcel/lazy/network.png differ diff --git a/public/img/logos/dorcel/misc/dorcel-club_dark.png b/public/img/logos/dorcel/misc/dorcel-club_dark.png new file mode 100644 index 000000000..30c959535 Binary files /dev/null and b/public/img/logos/dorcel/misc/dorcel-club_dark.png differ diff --git a/public/img/logos/dorcel/network.png b/public/img/logos/dorcel/network.png new file mode 100644 index 000000000..705b20ef0 Binary files /dev/null and b/public/img/logos/dorcel/network.png differ diff --git a/public/img/logos/dorcel/thumbs/dorcel.png b/public/img/logos/dorcel/thumbs/dorcel.png new file mode 100644 index 000000000..9d3ba5c9a Binary files /dev/null and b/public/img/logos/dorcel/thumbs/dorcel.png differ diff --git a/public/img/logos/dorcel/thumbs/dorcelclub.png b/public/img/logos/dorcel/thumbs/dorcelclub.png new file mode 100644 index 000000000..dc33b3931 Binary files /dev/null and b/public/img/logos/dorcel/thumbs/dorcelclub.png differ diff --git a/public/img/logos/dorcel/thumbs/network.png b/public/img/logos/dorcel/thumbs/network.png new file mode 100644 index 000000000..03aa1977d Binary files /dev/null and b/public/img/logos/dorcel/thumbs/network.png differ diff --git a/seeds/00_tags.js b/seeds/00_tags.js index 2f2c9de77..085eb7eb2 100644 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -1057,6 +1057,11 @@ const aliases = [ for: 'bts', secondary: true, }, + { + name: 'making of', + for: 'bts', + secondary: true, + }, { name: 'mfm', for: 'mmf', diff --git a/seeds/01_networks.js b/seeds/01_networks.js index 532570b60..af51d21eb 100644 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -148,6 +148,11 @@ const networks = [ name: 'CzechAV', url: 'https://www.czechav.com', }, + { + slug: 'dorcel', + name: 'Marc Dorcel', + url: 'https://www.dorcel.com', + }, { slug: 'fcuk', name: 'Fcuk', diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 0ed10e425..72401365a 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -2182,6 +2182,13 @@ const sites = [ description: '', parent: 'dogfartnetwork', }, + // DORCEL + { + slug: 'dorcelclub', + name: 'Dorcel Club', + url: 'https://www.dorcelclub.com', + parent: 'dorcel', + }, // ELEGANT ANGEL { slug: 'elegantangel', diff --git a/src/scrapers/dorcel.js b/src/scrapers/dorcel.js new file mode 100644 index 000000000..faca37bac --- /dev/null +++ b/src/scrapers/dorcel.js @@ -0,0 +1,131 @@ +'use strict'; + +const qu = require('../utils/q'); +const slugify = require('../utils/slugify'); + +function scrapeAll(scenes) { + return scenes.map(({ query }) => { + const release = {}; + + release.url = query.url('.title a'); + release.entryId = new URL(release.url).pathname.match(/\/scene\/(\d+)/)[1]; + + release.title = query.cnt('.title a'); + + release.date = query.date('.date', 'MMMM DD, YYYY', /\w+ \d{1,2}, \d{4}/); + release.duration = query.number('.length') * 60; + + release.actors = query.all('.actors a').map(actorEl => ({ + name: query.cnt(actorEl), + url: query.url(actorEl, null), + })); + + release.poster = query.img('.poster noscript img'); + release.stars = query.count('.rating .star1'); + + release.tags = [query.cnt('.collection a')]; + + return release; + }); +} + +function scrapeScene({ query }, url) { + const release = {}; + + release.entryId = new URL(url).pathname.match(/\/scene\/(\d+)/)[1]; + + release.title = query.cnt('.infos .title h1'); + release.description = query.cnt('#description p:nth-child(2)'); + + release.date = query.date('.infos .date', 'MMMM DD, YYYY', /\w+ \d{1,2}, \d{4}/); + release.duration = query.number('.infos .length') * 60; + + release.actors = query.all('.infos .actors a').map(actorEl => ({ + name: query.cnt(actorEl), + url: query.url(actorEl, null), + })); + + release.poster = query.img('.poster noscript img'); + release.stars = query.count('.infos .rating .star1'); + + if (query.exists('.movie')) { + release.movie = { + name: query.cnt('.movie a'), + url: query.url('.movie a'), + }; + + release.movie.entryId = new URL(release.movie.url).pathname.split('/').slice(-1)[0]; + } + + return release; +} + +function scrapeProfile({ query, el }, avatar) { + const profile = {}; + + profile.birthdate = qu.parseDate(query.text('.birthdate'), 'MMMM DD, YYYY'); + profile.nationality = query.text('.nationality'); + profile.hairColor = query.text('.hair'); + + profile.description = query.cnt('.bio_results p'); + + if (avatar) { + profile.avatar = [ + avatar.replace('_crop', ''), + avatar, + ]; + } + + // TODO: add pagination + profile.releases = scrapeAll(qu.initAll(el, '.scene')); + + return profile; +} + +// TODO: add movies + +async function fetchLatest(channel, page = 1) { + const url = `${channel.url}/en/news-videos-x-marc-dorcel-ajax?page=${page}&sorting=publish_date`; + const res = await qu.getAll(url, '.scene', { + 'X-Requested-With': 'XMLHttpRequest', + }); + + if (res.ok) { + return scrapeAll(res.items, channel); + } + + return res.status; +} + +async function fetchScene(url, channel) { + const res = await qu.get(url); + + if (res.ok) { + return scrapeScene(res.item, url, channel); + } + + return res.status; +} + +async function fetchProfile({ name: actorName, url: actorUrl }, entity, include) { + const searchRes = await qu.getAll(`${entity.url}/en/pornstars?search=${slugify(actorName, '+')}`, '.actor'); + + const actorItem = searchRes.ok && searchRes.items.find(actor => slugify(actor.query.cnt('h2')) === slugify(actorName)); + const actorItemUrl = actorItem?.query.url(); + const actorItemAvatar = actorItem?.query.img(); + + const url = actorUrl || actorItemUrl || `${entity.url}/en/pornstar/${slugify(actorName, '-')}`; + const res = await qu.get(url); + + if (res.ok) { + return scrapeProfile(res.item, actorItemAvatar, entity, include); + } + + return res.status; +} + +module.exports = { + fetchLatest, + fetchScene, + fetchProfile, +}; diff --git a/src/scrapers/pascalssubsluts.js b/src/scrapers/pascalssubsluts.js index 4de803d5c..f97473ae0 100644 --- a/src/scrapers/pascalssubsluts.js +++ b/src/scrapers/pascalssubsluts.js @@ -65,7 +65,7 @@ function scrapeProfile({ query }) { profile.nationality = bio.nationality; profile.height = feetInchesToCm(bio.height); profile.age = bio.age; - profile.hair = bio.hair; + profile.hairColor = bio.hair; profile.description = query.cnt('.twocolumns'); profile.avatar = query.img('#individual-description img'); diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index ffbfa4c28..756ff37da 100644 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -16,6 +16,7 @@ const czechav = require('./czechav'); const ddfnetwork = require('./ddfnetwork'); const digitalplayground = require('./digitalplayground'); const dogfart = require('./dogfart'); +const dorcel = require('./dorcel'); const elegantangel = require('./elegantangel'); const evilangel = require('./evilangel'); const fakehub = require('./fakehub'); @@ -100,6 +101,7 @@ module.exports = { digitalplayground, dogfart, dogfartnetwork: dogfart, + dorcel, elegantangel, evilangel, fakehub, @@ -189,6 +191,7 @@ module.exports = { devilsfilm: famedigital, digitalplayground, dtfsluts: fullpornnetwork, + dorcelclub: dorcel, elegantangel, evilangel, eyeontheguy: hush, diff --git a/src/utils/qu.js b/src/utils/qu.js index 79f46ded5..58c0505df 100644 --- a/src/utils/qu.js +++ b/src/utils/qu.js @@ -95,6 +95,10 @@ function exists(context, selector) { return !!q(context, selector); } +function count(context, selector) { + return all(context, selector)?.length || 0; +} + function content(context, selector, applyTrim = true) { return q(context, selector, 'textContent', applyTrim); } @@ -323,6 +327,7 @@ const quFuncs = { contents, cnt: content, cnts: contents, + count, date, dateAgo, dur: duration,