Compare commits

...

5 Commits

Author SHA1 Message Date
DebaucheryLibrarian 96e094ee88 1.217.1 2022-05-30 00:05:37 +02:00
DebaucheryLibrarian 85c73bad77 Improved MindGeek actor scraper. 2022-05-30 00:05:33 +02:00
DebaucheryLibrarian 587c111449 1.217.0 2022-05-29 21:10:46 +02:00
DebaucheryLibrarian 43d239a6ae Added Ricky's Room. 2022-05-29 21:10:44 +02:00
DebaucheryLibrarian 0fa36b17bf Refactored upcoming scenes in Vixen scraper. 2022-05-24 00:22:33 +02:00
25 changed files with 333 additions and 152 deletions

View File

@ -22,7 +22,7 @@
class="favicon" class="favicon"
> >
<img <img
:src="`/img/logos/${actor.entity.slug}/favicon_dark.png`" :src="`/img/logos/${actor.entity.slug}/favicon_light.png`"
class="favicon-icon" class="favicon-icon"
> >
</RouterLink> </RouterLink>

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.216.0", "version": "1.217.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.216.0", "version": "1.217.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.216.0", "version": "1.217.1",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -8093,6 +8093,12 @@ const sites = [
parameters: null, parameters: null,
parent: 'realitykings', parent: 'realitykings',
}, },
// RICKYS ROOM
{
name: 'Ricky\'s Room',
slug: 'rickysroom',
url: 'https://rickysroom.com',
},
// SCORE // SCORE
{ {
name: '18 Eighteen', name: '18 Eighteen',

View File

@ -242,29 +242,22 @@ async function getSession(site, parameters, url) {
throw new Error(`Failed to acquire MindGeek session (${res.statusCode})`); throw new Error(`Failed to acquire MindGeek session (${res.statusCode})`);
} }
function scrapeProfile(data, html, releases = [], networkName) { function scrapeProfile(data, releases = [], networkName) {
const { query } = qu.extract(html);
const profile = { const profile = {
description: data.bio, description: data.bio,
aliases: data.aliases, aliases: data.aliases.filter(Boolean),
}; };
profile.gender = data.gender === 'other' ? 'transsexual' : data.gender; profile.gender = data.gender === 'other' ? 'transsexual' : data.gender;
profile.measurements = data.measurements;
if (data.measurements) { profile.dateOfBirth = qu.parseDate(data.birthday);
const [bust, waist, hip] = data.measurements.split('-'); profile.birthPlace = data.birthPlace;
profile.height = inchesToCm(data.height);
profile.weight = lbsToKg(data.weight);
if (profile.gender === 'female') { profile.hairColor = data.tags.find((tag) => /hair color/i.test(tag.category))?.name;
if (bust) profile.bust = bust.toUpperCase(); profile.ethnicity = data.tags.find((tag) => /ethnicity/i.test(tag.category))?.name;
if (waist) profile.waist = waist;
if (hip) profile.hip = hip;
}
}
if (data.birthPlace) profile.birthPlace = data.birthPlace;
if (data.height) profile.height = inchesToCm(data.height);
if (data.weight) profile.weight = lbsToKg(data.weight);
if (data.images.card_main_rect?.[0]) { if (data.images.card_main_rect?.[0]) {
profile.avatar = data.images.card_main_rect[0].xl?.url profile.avatar = data.images.card_main_rect[0].xl?.url
@ -274,9 +267,6 @@ function scrapeProfile(data, html, releases = [], networkName) {
|| data.images.card_main_rect[0].xs?.url; || data.images.card_main_rect[0].xs?.url;
} }
const birthdate = query.all('li').find((el) => /Date of Birth/.test(el.textContent));
if (birthdate) profile.birthdate = query.date(birthdate, 'span', 'MMMM Do, YYYY');
if (data.tags.some((tag) => /boob type/i.test(tag.category) && /natural tits/i.test(tag.name))) { if (data.tags.some((tag) => /boob type/i.test(tag.category) && /natural tits/i.test(tag.name))) {
profile.naturalBoobs = true; profile.naturalBoobs = true;
} }
@ -285,6 +275,14 @@ function scrapeProfile(data, html, releases = [], networkName) {
profile.naturalBoobs = false; profile.naturalBoobs = false;
} }
if (data.tags.some((tag) => /body art/i.test(tag.category) && /tattoo/i.test(tag.name))) {
profile.hasTattoos = true;
}
if (data.tags.some((tag) => /body art/i.test(tag.category) && /piercing/i.test(tag.name))) {
profile.hasPiercings = true;
}
profile.releases = releases.map((release) => scrapeRelease(release, null, null, networkName)); profile.releases = releases.map((release) => scrapeRelease(release, null, null, networkName));
return profile; return profile;
@ -377,7 +375,7 @@ async function fetchRelease(url, site, baseScene, options) {
return null; return null;
} }
async function fetchProfile({ name: actorName, slug: actorSlug }, { entity, parameters }) { async function fetchProfile({ name: actorName }, { entity, parameters }, include) {
// const url = `https://www.${networkOrNetworkSlug.slug || networkOrNetworkSlug}.com`; // const url = `https://www.${networkOrNetworkSlug.slug || networkOrNetworkSlug}.com`;
const { session, instanceToken } = await getSession(entity, parameters); const { session, instanceToken } = await getSession(entity, parameters);
@ -395,31 +393,22 @@ async function fetchProfile({ name: actorName, slug: actorSlug }, { entity, para
const actorData = res.body.result.find((actor) => actor.name.toLowerCase() === actorName.toLowerCase()); const actorData = res.body.result.find((actor) => actor.name.toLowerCase() === actorName.toLowerCase());
if (actorData) { if (actorData) {
const actorUrl = `https://www.${entity.slug}.com/${entity.parameters?.actorPath || 'model'}/${actorData.id}/${actorSlug}`;
const actorReleasesUrl = `https://site-api.project1service.com/v2/releases?actorId=${actorData.id}&limit=100&offset=0&orderBy=-dateReleased&type=scene`; const actorReleasesUrl = `https://site-api.project1service.com/v2/releases?actorId=${actorData.id}&limit=100&offset=0&orderBy=-dateReleased&type=scene`;
const [actorRes, actorReleasesRes] = await Promise.all([ const actorReleasesRes = include.includeActorScenes && await http.get(actorReleasesUrl, {
http.get(actorUrl, {
interval: parameters.interval,
concurrency: parameters.concurrency,
}),
http.get(actorReleasesUrl, {
session, session,
interval: parameters.interval, interval: parameters.interval,
concurrency: parameters.concurrency, concurrency: parameters.concurrency,
headers: { headers: {
Instance: instanceToken, Instance: instanceToken,
}, },
}), });
]);
if (actorRes.statusCode === 200 && actorReleasesRes.statusCode === 200 && actorReleasesRes.body.result) { if (actorReleasesRes.statusCode === 200 && actorReleasesRes.body.result) {
return scrapeProfile(actorData, actorRes.body.toString(), actorReleasesRes.body.result, entity.slug); return scrapeProfile(actorData, actorReleasesRes.body.result, entity.slug);
} }
if (actorRes.statusCode === 200) { return scrapeProfile(actorData, [], entity.slug);
return scrapeProfile(actorData, actorRes.body.toString(), null, entity.slug);
}
} }
} }

125
src/scrapers/rickysroom.js Normal file
View File

@ -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,
};

View File

@ -53,6 +53,7 @@ const pinkyxxx = require('./pinkyxxx');
const privateNetwork = require('./private'); // reserved keyword const privateNetwork = require('./private'); // reserved keyword
const purgatoryx = require('./purgatoryx'); // reserved keyword const purgatoryx = require('./purgatoryx'); // reserved keyword
const radical = require('./radical'); const radical = require('./radical');
const rickysroom = require('./rickysroom');
const score = require('./score'); const score = require('./score');
const spizoo = require('./spizoo'); const spizoo = require('./spizoo');
const teamskeet = require('./teamskeet'); const teamskeet = require('./teamskeet');
@ -140,6 +141,7 @@ const scrapers = {
private: privateNetwork, private: privateNetwork,
purgatoryx, purgatoryx,
radical, radical,
rickysroom,
score, score,
sexyhub: mindgeek, sexyhub: mindgeek,
spizoo, spizoo,
@ -264,6 +266,7 @@ const scrapers = {
purgatoryx, purgatoryx,
realitykings: mindgeek, realitykings: mindgeek,
realvr: badoink, realvr: badoink,
rickysroom,
roccosiffredi: famedigital, roccosiffredi: famedigital,
score, score,
seehimfuck: hush, seehimfuck: hush,

View File

@ -14,34 +14,6 @@ const genderMap = {
T: 'transsexual', // not yet observed T: 'transsexual', // not yet observed
}; };
function getPosterFallbacks(poster) {
return poster
.filter((image) => /landscape/i.test(image.name))
.sort((imageA, imageB) => imageB.height - imageA.height)
.map((image) => {
const sources = [image.src, image.highdpi?.['2x'], image.highdpi?.['3x']];
// high DPI images for full HD source are huge, only prefer for smaller fallback sources
return image.height === 1080 ? sources : sources.reverse();
})
.flat()
.map((src) => ({
src,
expectType: {
'binary/octet-stream': 'image/jpeg',
},
}));
}
function getTeaserFallbacks(teaser) {
return teaser
.filter((video) => /landscape/i.test(video.name))
.map((video) => ({
src: video.src,
type: video.type,
quality: Number(String(video.height).replace('353', '360')),
}));
}
function getAvatarFallbacks(avatar) { function getAvatarFallbacks(avatar) {
return avatar return avatar
.sort((imageA, imageB) => imageB.height - imageA.height) .sort((imageA, imageB) => imageB.height - imageA.height)
@ -181,42 +153,101 @@ function scrapeAll(scenes, channel) {
release.stars = data.rating; release.stars = data.rating;
console.log(data);
console.log(release);
return release; return release;
}); });
} }
function scrapeUpcoming(scene, site) { function scrapeUpcoming(scene, site) {
if (!scene || scene.isPreReleasePeriod) return null; if (!scene || scene.isPreReleasePeriod) {
return null;
}
const release = {}; const release = {};
release.title = scene.targetUrl release.entryId = scene.videoId;
.slice(1) release.url = `${site.url}/videos/${scene.slug}`;
release.title = scene.slug
.split('-') .split('-')
.map((component) => `${component.charAt(0).toUpperCase()}${component.slice(1)}`) .map((component) => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
.join(' '); .join(' ');
release.url = `${site.url}/videos${scene.targetUrl}`;
release.date = moment.utc(scene.releaseDate).toDate(); release.date = moment.utc(scene.releaseDate).toDate();
release.datePrecision = 'minute'; release.datePrecision = 'minute';
release.actors = scene.models; release.actors = scene.models.map((model) => model.name);
release.poster = getPosterFallbacks(scene.images.poster); release.poster = curateSources(scene.images.poster);
release.teaser = getTeaserFallbacks(scene.previews.poster); release.teaser = curateSources(scene.previews.poster);
release.entryId = (release.poster[0] || release.teaser[0])?.src?.match(/\/(\d+)/)?.[1];
console.log('upcoming', scene);
return [release]; return [release];
} }
async function scrapeScene(data, url, channel, options) { async function fetchGraphqlDetails(release, channel, session) {
const query = `
query($query: String!, $site: Site!) {
searchVideos(input: {
query: $query
site: $site
}) {
edges {
node {
videoId
title
slug
description
releaseDate
categories {
name
}
chapters {
video {
title
seconds
}
}
models {
name
}
images {
poster {
...ImageInfo
}
}
}
}
}
}
fragment ImageInfo on Image {
src
highdpi {
double
}
}
`;
const variables = JSON.stringify({
site: channel.slug.toUpperCase(),
query: release.title,
});
const res = await http.get(`${channel.url}/graphql?query=${encodeURI(query)}&variables=${variables}`, {
session,
headers: {
referer: channel.url,
accept: '*/*',
},
});
if (res.ok) {
return res.body.data?.searchVideos?.edges?.find((edge) => edge.node.videoId === release.entryId)?.node || null;
}
return null;
}
async function scrapeScene(data, url, channel, options, session) {
const release = { const release = {
url, url,
entryId: data.video.videoId || data.video.newId, entryId: data.video.videoId || data.video.newId,
@ -251,7 +282,17 @@ async function scrapeScene(data, url, channel, options) {
release.qualities = data.video?.downloadResolutions.map((quality) => Number(quality.width)).filter(Boolean); // width property is actually the height release.qualities = data.video?.downloadResolutions.map((quality) => Number(quality.width)).filter(Boolean); // width property is actually the height
console.log(release); const graphqlDetails = await fetchGraphqlDetails(release, channel, session);
if (graphqlDetails) {
release.tags = graphqlDetails.categories?.map((category) => category.name);
release.chapters = graphqlDetails.chapters?.video?.map((chapter) => ({
time: chapter.seconds,
tags: [chapter.title],
}));
}
release.channel = data.video?.id.split(':')[0];
return release; return release;
} }
@ -305,61 +346,6 @@ async function scrapeProfile(data, origin, withReleases) {
return profile; return profile;
} }
async function fetchLatestGraphql(channel, page = 1) {
const query = `
query($query: String!, $site: Site!) {
searchVideos(input: {
query: $query
site: $site
}) {
edges {
node {
title
slug
description
releaseDate
categories {
name
}
chapters {
video {
title
seconds
}
}
models {
name
}
images {
poster {
...ImageInfo
}
}
}
}
}
}
fragment ImageInfo on Image {
src
highdpi {
double
}
}
`;
const variables = JSON.stringify({
site: channel.slug.toUpperCase(),
query: 'alone at last',
});
const res = await http.get(`${channel.url}/graphql?query=${encodeURI(query)}&variables=${variables}`);
console.log(res.body);
console.log(res.body.errors);
console.log(res.body.data?.searchVideos?.edges.map((edge) => edge.node));
}
async function fetchLatest(site, page = 1) { async function fetchLatest(site, page = 1) {
const url = `${site.url}/videos?page=${page}`; const url = `${site.url}/videos?page=${page}`;
const res = await qu.get(url); const res = await qu.get(url);
@ -378,13 +364,85 @@ async function fetchLatest(site, page = 1) {
return res.status; return res.status;
} }
async function fetchUpcoming(site) { async function fetchUpcoming(channel) {
const apiUrl = `${site.url}/api`; const query = `
const res = await http.get(apiUrl); query getNextScene($site: Site!) {
nextScene: findNextReleaseVideo(input: { site: $site }) {
videoId
slug
isPreReleasePeriod
releaseDate
models {
name
__typename
}
images {
countdown {
...ImageInfo
__typename
}
poster {
...ImageInfo
__typename
}
__typename
}
previews {
countdown {
...PreviewInfo
__typename
}
poster {
...PreviewInfo
__typename
}
__typename
}
__typename
}
}
fragment ImageInfo on Image {
src
placeholder
width
height
highdpi {
double
triple
__typename
}
webp {
src
placeholder
highdpi {
double
triple
__typename
}
__typename
}
}
fragment PreviewInfo on Preview {
src
width
height
type
}
`;
const res = await http.post(`${channel.url}/graphql`, {
operationName: 'getNextScene',
query,
variables: {
site: channel.slug.toUpperCase(),
},
});
if (res.ok) { if (res.ok) {
if (res.body.data.nextScene) { if (res.body.data.nextScene) {
return scrapeUpcoming(res.body.data.nextScene, site); return scrapeUpcoming(res.body.data.nextScene, channel);
} }
return []; return [];
@ -394,13 +452,14 @@ async function fetchUpcoming(site) {
} }
async function fetchScene(url, channel, baseRelease, options) { async function fetchScene(url, channel, baseRelease, options) {
const res = await qu.get(url); const session = qu.session();
const res = await qu.get(url, null, null, { session });
if (res.ok) { if (res.ok) {
const dataString = res.item.query.html('#__NEXT_DATA__'); const dataString = res.item.query.html('#__NEXT_DATA__');
const data = dataString && JSON.parse(dataString); const data = dataString && JSON.parse(dataString);
return scrapeScene(data.props.pageProps, url, channel, options); return scrapeScene(data.props.pageProps, url, channel, options, session);
} }
return res.status; return res.status;
@ -424,7 +483,6 @@ async function fetchProfile({ name: actorName }, { site }, include) {
} }
module.exports = { module.exports = {
// fetchLatest: fetchLatestGraphql,
fetchLatest, fetchLatest,
fetchUpcoming, fetchUpcoming,
fetchScene, fetchScene,

View File

@ -48,7 +48,7 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce
curatedRelease.shoot_id = release.shootId || null; curatedRelease.shoot_id = release.shootId || null;
curatedRelease.production_date = Number(release.productionDate) ? release.productionDate : null; curatedRelease.production_date = Number(release.productionDate) ? release.productionDate : null;
curatedRelease.duration = release.duration; 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) { if (release.productionLocation) {