diff --git a/public/img/logos/rickysroom/favicon.png b/public/img/logos/rickysroom/favicon.png new file mode 100644 index 00000000..2634d2da Binary files /dev/null and b/public/img/logos/rickysroom/favicon.png differ diff --git a/public/img/logos/rickysroom/favicon_dark.png b/public/img/logos/rickysroom/favicon_dark.png new file mode 100644 index 00000000..f57bf8b1 Binary files /dev/null and b/public/img/logos/rickysroom/favicon_dark.png differ diff --git a/public/img/logos/rickysroom/favicon_light.png b/public/img/logos/rickysroom/favicon_light.png new file mode 100644 index 00000000..5b57f6d4 Binary files /dev/null and b/public/img/logos/rickysroom/favicon_light.png differ diff --git a/public/img/logos/rickysroom/lazy/favicon.png b/public/img/logos/rickysroom/lazy/favicon.png new file mode 100644 index 00000000..e97243f8 Binary files /dev/null and b/public/img/logos/rickysroom/lazy/favicon.png differ diff --git a/public/img/logos/rickysroom/lazy/favicon_dark.png b/public/img/logos/rickysroom/lazy/favicon_dark.png new file mode 100644 index 00000000..cfeeff1f Binary files /dev/null and b/public/img/logos/rickysroom/lazy/favicon_dark.png differ diff --git a/public/img/logos/rickysroom/lazy/favicon_light.png b/public/img/logos/rickysroom/lazy/favicon_light.png new file mode 100644 index 00000000..37693fb8 Binary files /dev/null and b/public/img/logos/rickysroom/lazy/favicon_light.png differ diff --git a/public/img/logos/rickysroom/lazy/network.png b/public/img/logos/rickysroom/lazy/network.png new file mode 100644 index 00000000..8e1309e6 Binary files /dev/null and b/public/img/logos/rickysroom/lazy/network.png differ diff --git a/public/img/logos/rickysroom/lazy/rickysroom.png b/public/img/logos/rickysroom/lazy/rickysroom.png new file mode 100644 index 00000000..15461fa9 Binary files /dev/null and b/public/img/logos/rickysroom/lazy/rickysroom.png differ diff --git a/public/img/logos/rickysroom/misc/favicon_large.png b/public/img/logos/rickysroom/misc/favicon_large.png new file mode 100644 index 00000000..988ac31a Binary files /dev/null and b/public/img/logos/rickysroom/misc/favicon_large.png differ diff --git a/public/img/logos/rickysroom/network.png b/public/img/logos/rickysroom/network.png new file mode 100644 index 00000000..3df0d3c4 Binary files /dev/null and b/public/img/logos/rickysroom/network.png differ diff --git a/public/img/logos/rickysroom/rickysroom.png b/public/img/logos/rickysroom/rickysroom.png new file mode 100644 index 00000000..3df0d3c4 Binary files /dev/null and b/public/img/logos/rickysroom/rickysroom.png differ diff --git a/public/img/logos/rickysroom/thumbs/favicon.png b/public/img/logos/rickysroom/thumbs/favicon.png new file mode 100644 index 00000000..dbf1a91c Binary files /dev/null and b/public/img/logos/rickysroom/thumbs/favicon.png differ diff --git a/public/img/logos/rickysroom/thumbs/favicon_dark.png b/public/img/logos/rickysroom/thumbs/favicon_dark.png new file mode 100644 index 00000000..5e5a11be Binary files /dev/null and b/public/img/logos/rickysroom/thumbs/favicon_dark.png differ diff --git a/public/img/logos/rickysroom/thumbs/favicon_light.png b/public/img/logos/rickysroom/thumbs/favicon_light.png new file mode 100644 index 00000000..be41e0a7 Binary files /dev/null and b/public/img/logos/rickysroom/thumbs/favicon_light.png differ diff --git a/public/img/logos/rickysroom/thumbs/network.png b/public/img/logos/rickysroom/thumbs/network.png new file mode 100644 index 00000000..df9f8ab3 Binary files /dev/null and b/public/img/logos/rickysroom/thumbs/network.png differ diff --git a/public/img/logos/rickysroom/thumbs/rickysroom.png b/public/img/logos/rickysroom/thumbs/rickysroom.png new file mode 100644 index 00000000..9c82b009 Binary files /dev/null and b/public/img/logos/rickysroom/thumbs/rickysroom.png differ diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 4f2a1ebc..2f4c3b89 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -8093,6 +8093,12 @@ const sites = [ parameters: null, parent: 'realitykings', }, + // RICKYS ROOM + { + name: 'Ricky\'s Room', + slug: 'rickysroom', + url: 'https://rickysroom.com', + }, // SCORE { name: '18 Eighteen', diff --git a/src/scrapers/rickysroom.js b/src/scrapers/rickysroom.js new file mode 100644 index 00000000..6530cbaf --- /dev/null +++ b/src/scrapers/rickysroom.js @@ -0,0 +1,125 @@ +'use strict'; + +const qu = require('../utils/q'); +const { lbsToKg, feetInchesToCm } = require('../utils/convert'); + +function scrapeScene(data, channel) { + const release = {}; + + release.entryId = data.id; + release.url = qu.prefixUrl(`/videos/${data.slug}`, channel.url); + + release.title = data.title; + release.description = data.description; + release.date = qu.parseDate(data.publish_date, 'YYYY/MM/DD HH:mm:ss'); + release.duration = qu.durationToSeconds(data.videos_duration); + + release.actors = data?.models_thumbs.map((model) => ({ + name: model.name, + url: qu.prefixUrl(`/models/${model.slug}`, channel.url), + avatar: model.thumb, + })) || data.models; + + release.tags = data.tags; + + release.poster = [data.trailer_screencap].concat(data.extra_thumbnails); + release.photos = data.previews.full + .map((url) => [url, url.replace('full/', 'thumbs/')]) // photos + .concat(data.thumbs); // screenshots + + release.trailer = data.trailer_url; + release.teaser = data.special_thumbnails; + + release.qualities = data.videos && Object.values(data.videos).map((video) => video.height); + release.rating = data.rating; + + return release; +} + +function scrapeProfile(data, scenes, entity) { + const profile = {}; + + profile.entryId = data.id; + profile.url = qu.prefixUrl(`/models/${data.slug}`, entity.url); + + profile.description = data.Bio || data.bio; + profile.birthPlace = data.Born || data.born; + profile.dateOfBirth = qu.parseDate(data.Birthdate || data.birthdate, 'YYYY-MM-DD'); + + profile.measurements = data.Measurements || data.Measurements; + profile.height = feetInchesToCm(data.Height || data.height); + profile.weight = lbsToKg(data.Weight || data.weight); + + profile.eyes = data.Eyes || data.eyes; + profile.hairColor = data.Hair || data.hair; + + profile.avatar = data.thumb; + + profile.scenes = scenes?.map((scene) => scrapeScene(scene, entity)); + + return profile; +} + +async function fetchLatest(channel, page = 1) { + const url = `${channel.url}/videos?order_by=publish_date&per_page=100&page=${page}`; // unsure if page works, not enough videos as of 2022-05-29 + const res = await qu.get(url); + + if (res.ok) { + const dataString = res.item.query.html('#__NEXT_DATA__'); + const data = dataString && JSON.parse(dataString); + + if (data.props?.pageProps?.contents?.data) { + return data.props.pageProps.contents.data.map((scene) => scrapeScene(scene, channel)); + } + + return null; + } + + return res.status; +} + +async function fetchScene(url, channel, baseRelease) { + if (baseRelease.entryId) { + // deep data is identical to update data + return baseRelease; + } + + const res = await qu.get(url); + + if (res.ok) { + const dataString = res.item.query.html('#__NEXT_DATA__'); + const data = dataString && JSON.parse(dataString); + + if (data.props?.pageProps?.content) { + return scrapeScene(data.props.pageProps.content, channel); + } + + return null; + } + + return res.status; +} + +async function fetchProfile({ slug }, entity) { + const url = `${entity.url}/models/${slug}`; + const res = await qu.get(url); + + if (res.ok) { + const dataString = res.item.query.html('#__NEXT_DATA__'); + const data = dataString && JSON.parse(dataString); + + if (data.props?.pageProps?.model) { + return scrapeProfile(data.props.pageProps.model, data.props.pageProps.model_contents, entity); + } + + return null; + } + + return res.status; +} + +module.exports = { + fetchLatest, + fetchScene, + fetchProfile, +}; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index c6f92157..41be46a7 100644 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -53,6 +53,7 @@ const pinkyxxx = require('./pinkyxxx'); const privateNetwork = require('./private'); // reserved keyword const purgatoryx = require('./purgatoryx'); // reserved keyword const radical = require('./radical'); +const rickysroom = require('./rickysroom'); const score = require('./score'); const spizoo = require('./spizoo'); const teamskeet = require('./teamskeet'); @@ -140,6 +141,7 @@ const scrapers = { private: privateNetwork, purgatoryx, radical, + rickysroom, score, sexyhub: mindgeek, spizoo, @@ -264,6 +266,7 @@ const scrapers = { purgatoryx, realitykings: mindgeek, realvr: badoink, + rickysroom, roccosiffredi: famedigital, score, seehimfuck: hush, diff --git a/src/store-releases.js b/src/store-releases.js index ee4fb7f6..85775771 100644 --- a/src/store-releases.js +++ b/src/store-releases.js @@ -48,7 +48,7 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce curatedRelease.shoot_id = release.shootId || null; curatedRelease.production_date = Number(release.productionDate) ? release.productionDate : null; curatedRelease.duration = release.duration; - curatedRelease.qualities = Array.from(new Set(release.qualities?.map(Number).filter(Boolean))); + curatedRelease.qualities = Array.from(new Set(release.qualities?.map(Number).filter(Boolean))).sort((qualityA, qualityB) => qualityB - qualityA); } if (release.productionLocation) {