Compare commits
No commits in common. "20ba833147855a9036144855783aa1581fa02430" and "ccac1f96dd2ce99dfbe7a530bdea931e504427b6" have entirely different histories.
20ba833147
...
ccac1f96dd
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.231.24",
|
"version": "1.231.23",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.231.24",
|
"version": "1.231.23",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.231.24",
|
"version": "1.231.23",
|
||||||
"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": {
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const unprint = require('unprint');
|
|
||||||
|
|
||||||
const http = require('../utils/http');
|
const http = require('../utils/http');
|
||||||
const qu = require('../utils/qu');
|
const qu = require('../utils/qu');
|
||||||
const slugify = require('../utils/slugify');
|
const slugify = require('../utils/slugify');
|
||||||
const { lbsToKg, feetInchesToCm } = require('../utils/convert');
|
const { lbsToKg, feetInchesToCm } = require('../utils/convert');
|
||||||
|
|
||||||
const teaserOrder = ['large', 'small', 'mobile'];
|
|
||||||
|
|
||||||
function scrapeSceneMetadata(data, channel) {
|
function scrapeSceneMetadata(data, channel) {
|
||||||
const release = {};
|
const release = {};
|
||||||
|
|
||||||
|
@ -54,49 +50,20 @@ function scrapeAllMetadata(scenes, channel) {
|
||||||
return scenes.map((data) => scrapeSceneMetadata(data, channel));
|
return scenes.map((data) => scrapeSceneMetadata(data, channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrapeSceneApi(data, channel) {
|
|
||||||
const release = {};
|
|
||||||
|
|
||||||
release.entryId = data.id;
|
|
||||||
release.url = `${channel.url}/videos/${data.slug}`;
|
|
||||||
|
|
||||||
release.title = data.title;
|
|
||||||
release.description = data.description;
|
|
||||||
|
|
||||||
release.date = unprint.extractDate(data.publish_date, 'YYYY/MM/DD HH:mm:ss') || unprint.extractDate(data.formatted_date, 'Do MMM YYYY');
|
|
||||||
release.duration = data.seconds_duration || unprint.extractDuration(data.videos_duration);
|
|
||||||
|
|
||||||
release.actors = data.models_thumbs?.map((actor) => ({
|
|
||||||
name: actor.name,
|
|
||||||
avatar: actor.thumb,
|
|
||||||
})) || data.models;
|
|
||||||
|
|
||||||
release.poster = data.trailer_screencap;
|
|
||||||
|
|
||||||
release.photos = [
|
|
||||||
...data.previews?.full || [],
|
|
||||||
...data.extra_thumbnails?.filter((thumbnail) => !thumbnail.includes('mobile') // mobile is the cropped photo of a photo already in the set
|
|
||||||
&& !(thumbnail.includes('_scene') && release.poster?.includes('_scene')) // likely the same photo, filename may differ so cannot compare full path
|
|
||||||
&& !(thumbnail.includes('_player') && release.poster?.includes('_player'))) || [],
|
|
||||||
];
|
|
||||||
|
|
||||||
release.caps = data.thumbs;
|
|
||||||
|
|
||||||
release.trailer = data.trailer_url;
|
|
||||||
release.teaser = data.special_thumbnails.sort((teaserA, teaserB) => teaserOrder.findIndex((label) => teaserA.includes(label)) - teaserOrder.findIndex((label) => teaserB.includes(label)));
|
|
||||||
|
|
||||||
release.tags = data.tags;
|
|
||||||
|
|
||||||
release.channel = slugify(data.site, '');
|
|
||||||
release.qualities = Object.values(data.videos || []).map((video) => video.height);
|
|
||||||
|
|
||||||
release.photoCount = Number(data.photos_duration) || null;
|
|
||||||
|
|
||||||
return release;
|
|
||||||
}
|
|
||||||
|
|
||||||
function scrapeAllApi(scenes, channel) {
|
function scrapeAllApi(scenes, channel) {
|
||||||
return scenes.map((data) => scrapeSceneApi(data, channel));
|
return scenes.map((data) => {
|
||||||
|
const release = {};
|
||||||
|
|
||||||
|
release.entryId = data.id;
|
||||||
|
|
||||||
|
release.title = data.title;
|
||||||
|
release.description = data.description;
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
console.log(release);
|
||||||
|
|
||||||
|
return release;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrapeProfileMetadata(data, channel) {
|
function scrapeProfileMetadata(data, channel) {
|
||||||
|
@ -124,68 +91,6 @@ function scrapeProfileMetadata(data, channel) {
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrapeProfileApi(data, channel, scenes) {
|
|
||||||
const profile = {};
|
|
||||||
const bio = Object.fromEntries(Object.entries(data).map(([key, value]) => [key.toLowerCase(), value])); // keys are mixed upper and lowercase
|
|
||||||
|
|
||||||
profile.entryId = bio.id;
|
|
||||||
|
|
||||||
profile.description = bio.bio;
|
|
||||||
|
|
||||||
profile.gender = bio.gender;
|
|
||||||
|
|
||||||
profile.dateOfBirth = unprint.extractDate(bio.birthdate, 'YYYY-MM-DD');
|
|
||||||
profile.birthPlace = bio.born;
|
|
||||||
profile.age = bio.age;
|
|
||||||
|
|
||||||
profile.measurements = bio.measurements;
|
|
||||||
|
|
||||||
profile.height = feetInchesToCm(bio.height);
|
|
||||||
profile.weight = lbsToKg(bio.weight);
|
|
||||||
|
|
||||||
profile.eyes = bio.eyes;
|
|
||||||
profile.hairColor = bio.hair;
|
|
||||||
|
|
||||||
profile.avatar = data.thumb;
|
|
||||||
|
|
||||||
if (scenes) {
|
|
||||||
profile.scenes = scrapeAllApi(scenes, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchLatestApi(channel, page, { parameters }) {
|
|
||||||
const res = await http.get(`${channel.url}/_next/data/${parameters.endpoint}/videos.json?order_by=publish_date&sort_by=desc&per_page=8&page=${page}`);
|
|
||||||
|
|
||||||
if (res.ok && res.body.pageProps?.contents?.data) {
|
|
||||||
return scrapeAllApi(res.body.pageProps.contents.data, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.status;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchSceneApi(url, channel, baseScene, { parameters }) {
|
|
||||||
const slug = new URL(url).pathname.split('/').at(-1);
|
|
||||||
const res = await http.get(`${channel.url}/_next/data/${parameters.endpoint}/videos/${slug}.json?slug=${slug}`);
|
|
||||||
|
|
||||||
if (res.ok && res.body.pageProps?.content) {
|
|
||||||
return scrapeSceneApi(res.body.pageProps.content, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.status;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchProfileApi(actor, { channel, parameters }) {
|
|
||||||
const res = await http.get(`${channel.url}/_next/data/${parameters.endpoint}/models/${actor.slug}.json?slug=${actor.slug}`);
|
|
||||||
|
|
||||||
if (res.ok && res.body.pageProps?.model) {
|
|
||||||
return scrapeProfileApi(res.body.pageProps.model, channel, res.body.pageProps.model_contents);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.status;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchLatestMetadata(channel, page = 1) {
|
async function fetchLatestMetadata(channel, page = 1) {
|
||||||
const url = `${channel.url}/tour/videos?page=${page}`;
|
const url = `${channel.url}/tour/videos?page=${page}`;
|
||||||
const res = await http.get(url, {
|
const res = await http.get(url, {
|
||||||
|
@ -206,6 +111,16 @@ async function fetchLatestMetadata(channel, page = 1) {
|
||||||
return res.status;
|
return res.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchLatestApi(channel, page, { parameters }) {
|
||||||
|
const res = await http.get(`${channel.url}/_next/data/${parameters.endpoint}/videos.json?order_by=publish_date&sort_by=desc&per_page=30&page=${page}`);
|
||||||
|
|
||||||
|
if (res.ok) {
|
||||||
|
return scrapeAllApi(res.body.pageProps.contents.data, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.status;
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchSceneMetadata(url, channel) {
|
async function fetchSceneMetadata(url, channel) {
|
||||||
const res = await http.get(url, {
|
const res = await http.get(url, {
|
||||||
parse: true,
|
parse: true,
|
||||||
|
@ -254,7 +169,5 @@ module.exports = {
|
||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
fetchLatest: fetchLatestApi,
|
fetchLatest: fetchLatestApi,
|
||||||
fetchScene: fetchSceneApi,
|
|
||||||
fetchProfile: fetchProfileApi,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -190,7 +190,6 @@ const scrapers = {
|
||||||
bamvisions,
|
bamvisions,
|
||||||
bang,
|
bang,
|
||||||
bangbros,
|
bangbros,
|
||||||
bjraw: radical,
|
|
||||||
blacked: vixen,
|
blacked: vixen,
|
||||||
blackedraw: vixen,
|
blackedraw: vixen,
|
||||||
blackambush: elevatedx,
|
blackambush: elevatedx,
|
||||||
|
|
|
@ -56,7 +56,7 @@ async function resolvePlace(query) {
|
||||||
const place = {};
|
const place = {};
|
||||||
|
|
||||||
if (item.class === 'place' || item.class === 'boundary') {
|
if (item.class === 'place' || item.class === 'boundary') {
|
||||||
const location = rawPlace[item.type] || rawPlace.city || rawPlace.place || rawPlace.town;
|
const location = rawPlace[item.type] || rawPlace.city || rawPlace.place;
|
||||||
|
|
||||||
if (location) {
|
if (location) {
|
||||||
place.place = location;
|
place.place = location;
|
||||||
|
|
Loading…
Reference in New Issue