Compare commits
No commits in common. "73443b77a8a5fbb8624e3b1719a638bc35fe7fcc" and "70afe75eb475b609134a4c3b9ef0dd06004c80c3" have entirely different histories.
73443b77a8
...
70afe75eb4
|
@ -91,10 +91,9 @@ module.exports = {
|
||||||
'pervertgallery',
|
'pervertgallery',
|
||||||
'povperverts',
|
'povperverts',
|
||||||
],
|
],
|
||||||
'private',
|
|
||||||
'ddfnetwork',
|
|
||||||
'bangbros',
|
|
||||||
'kellymadison',
|
'kellymadison',
|
||||||
|
'bangbros',
|
||||||
|
'ddfnetwork',
|
||||||
'legalporno',
|
'legalporno',
|
||||||
'score',
|
'score',
|
||||||
'boobpedia',
|
'boobpedia',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.99.7",
|
"version": "1.99.6",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.99.7",
|
"version": "1.99.6",
|
||||||
"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": {
|
||||||
|
|
|
@ -5,9 +5,6 @@ const bhttp = require('bhttp');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
|
|
||||||
const { get, geta } = require('../utils/q');
|
|
||||||
const slugify = require('../utils/slugify');
|
|
||||||
|
|
||||||
async function getPhotos(entryId, site) {
|
async function getPhotos(entryId, site) {
|
||||||
const { hostname } = new URL(site.url);
|
const { hostname } = new URL(site.url);
|
||||||
|
|
||||||
|
@ -26,20 +23,17 @@ function scrapeLatest(html, site) {
|
||||||
|
|
||||||
return sceneElements.map((element) => {
|
return sceneElements.map((element) => {
|
||||||
const sceneLinkElement = $(element).find('h3 a');
|
const sceneLinkElement = $(element).find('h3 a');
|
||||||
const thumbnailElement = $(element).find('a img');
|
|
||||||
|
|
||||||
const url = sceneLinkElement.attr('href');
|
const url = sceneLinkElement.attr('href');
|
||||||
// const title = sceneLinkElement.text();
|
const title = sceneLinkElement.text();
|
||||||
const entryId = url.split('/').slice(-1)[0];
|
const entryId = url.split('/').slice(-1)[0];
|
||||||
|
|
||||||
const titleText = thumbnailElement.attr('alt');
|
const date = moment.utc($(element).find('.scene-date'), 'MM/DD/YYYY').toDate();
|
||||||
const title = titleText.slice(titleText.indexOf(':') + 1).trim();
|
|
||||||
|
|
||||||
const date = moment.utc($(element).find('.scene-date'), ['MM/DD/YYYY', 'YYYY-MM-DD']).toDate();
|
|
||||||
|
|
||||||
const actors = $(element).find('.scene-models a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
const actors = $(element).find('.scene-models a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||||
const likes = Number($(element).find('.scene-votes').text());
|
const likes = Number($(element).find('.scene-votes').text());
|
||||||
|
|
||||||
|
const thumbnailElement = $(element).find('img.img-responsive');
|
||||||
const photoCount = Number(thumbnailElement.attr('thumbs_num'));
|
const photoCount = Number(thumbnailElement.attr('thumbs_num'));
|
||||||
const poster = thumbnailElement.attr('src');
|
const poster = thumbnailElement.attr('src');
|
||||||
const photos = Array.from({ length: photoCount }, (val, index) => thumbnailElement.attr(`src${index + 1}`));
|
const photos = Array.from({ length: photoCount }, (val, index) => thumbnailElement.attr(`src${index + 1}`));
|
||||||
|
@ -64,7 +58,7 @@ function scrapeLatest(html, site) {
|
||||||
|
|
||||||
async function scrapeScene(html, url, site) {
|
async function scrapeScene(html, url, site) {
|
||||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||||
const release = { url };
|
const release = {};
|
||||||
|
|
||||||
[release.entryId] = url.split('/').slice(-1);
|
[release.entryId] = url.split('/').slice(-1);
|
||||||
release.title = $('.video-wrapper meta[itemprop="name"]').attr('content');
|
release.title = $('.video-wrapper meta[itemprop="name"]').attr('content');
|
||||||
|
@ -95,66 +89,11 @@ async function scrapeScene(html, url, site) {
|
||||||
release.movie = $('a[data-track="FULL MOVIE"]').attr('href');
|
release.movie = $('a[data-track="FULL MOVIE"]').attr('href');
|
||||||
|
|
||||||
const siteElement = $('.content-wrapper .logos-sites a');
|
const siteElement = $('.content-wrapper .logos-sites a');
|
||||||
if (siteElement) release.channel = slugify(siteElement.text(), { delimiter: '' });
|
if (siteElement) release.channel = siteElement.text().replace(/\s+/g, '').toLowerCase();
|
||||||
|
|
||||||
return release;
|
return release;
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrapeProfile({ html, q, qa, qtx }) {
|
|
||||||
const profile = {};
|
|
||||||
|
|
||||||
const bio = qa('.model-facts li:not(.model-facts-long)', true).reduce((acc, fact) => {
|
|
||||||
const [key, value] = fact.split(':');
|
|
||||||
const trimmedValue = value.trim();
|
|
||||||
|
|
||||||
if (trimmedValue.length === 0 || trimmedValue === '-') return acc;
|
|
||||||
return { ...acc, [slugify(key, { delimiter: '_' })]: trimmedValue };
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
const description = q('.model-facts-long', true);
|
|
||||||
if (description) profile.description = description;
|
|
||||||
|
|
||||||
const aliases = qtx('.aka')?.split(/,\s*/);
|
|
||||||
if (aliases) profile.aliases = aliases;
|
|
||||||
|
|
||||||
if (bio.birth_place) profile.birthPlace = bio.birth_place;
|
|
||||||
if (bio.nationality) profile.nationality = bio.nationality;
|
|
||||||
|
|
||||||
if (bio.measurements) {
|
|
||||||
const [bust, waist, hip] = bio.measurements.split('-');
|
|
||||||
|
|
||||||
if (bust) profile.bust = bust;
|
|
||||||
if (waist) profile.waist = Number(waist);
|
|
||||||
if (hip) profile.hip = Number(hip);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bio.weight) profile.weight = Number(bio.weight.match(/^\d+/)[0]);
|
|
||||||
if (bio.height) profile.height = Number(bio.height.match(/^\d+/)[0]);
|
|
||||||
|
|
||||||
if (bio.hair_color) profile.hair = bio.hair_color;
|
|
||||||
if (bio.eye_color) profile.eye = bio.eye_color;
|
|
||||||
|
|
||||||
if (bio.tattoos) {
|
|
||||||
profile.hasTattoos = true;
|
|
||||||
profile.tattoos = bio.tattoos;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bio.tattoos) {
|
|
||||||
profile.hasTattoos = true;
|
|
||||||
profile.tattoos = bio.tattoos;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bio.piercings) {
|
|
||||||
profile.hasPiercings = true;
|
|
||||||
profile.piercings = bio.piercings;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile.avatar = q('.img-pornstar img').dataset.src;
|
|
||||||
profile.releases = scrapeLatest(html);
|
|
||||||
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchLatest(site, page = 1) {
|
async function fetchLatest(site, page = 1) {
|
||||||
const { hostname } = new URL(site.url);
|
const { hostname } = new URL(site.url);
|
||||||
|
|
||||||
|
@ -175,27 +114,7 @@ async function fetchScene(url, site) {
|
||||||
return scrapeScene(res.body.toString(), url, site);
|
return scrapeScene(res.body.toString(), url, site);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchProfile(actorName) {
|
|
||||||
const actorSearchSlug = slugify(actorName, { delimiter: '+' });
|
|
||||||
const url = `https://www.private.com/search.php?query=${actorSearchSlug}`;
|
|
||||||
const modelLinks = await geta(url, '.model h3 a');
|
|
||||||
|
|
||||||
if (modelLinks) {
|
|
||||||
const actorSlug = slugify(actorName);
|
|
||||||
const model = modelLinks.find(({ text }) => slugify(text) === actorSlug);
|
|
||||||
|
|
||||||
if (model) {
|
|
||||||
const qProfile = await get(model.el.href);
|
|
||||||
|
|
||||||
return qProfile && scrapeProfile(qProfile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
fetchLatest,
|
fetchLatest,
|
||||||
fetchScene,
|
fetchScene,
|
||||||
fetchProfile,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -163,7 +163,6 @@ module.exports = {
|
||||||
pimpxxx: cherrypimps,
|
pimpxxx: cherrypimps,
|
||||||
pornhub,
|
pornhub,
|
||||||
povperverts: fullpornnetwork,
|
povperverts: fullpornnetwork,
|
||||||
private: privateNetwork,
|
|
||||||
realitykings,
|
realitykings,
|
||||||
score,
|
score,
|
||||||
thatsitcomshow: nubiles,
|
thatsitcomshow: nubiles,
|
||||||
|
|
|
@ -5,7 +5,6 @@ const moment = require('moment');
|
||||||
const http = require('./http');
|
const http = require('./http');
|
||||||
|
|
||||||
function trim(str) {
|
function trim(str) {
|
||||||
if (!str) return null;
|
|
||||||
return str.trim().replace(/\s+/g, ' ');
|
return str.trim().replace(/\s+/g, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +194,6 @@ function init(element, window) {
|
||||||
element,
|
element,
|
||||||
el: element,
|
el: element,
|
||||||
html: element.outerHTML || element.body.outerHTML,
|
html: element.outerHTML || element.body.outerHTML,
|
||||||
text: trim(element.textContent),
|
|
||||||
...(window && {
|
...(window && {
|
||||||
window,
|
window,
|
||||||
document: window.document,
|
document: window.document,
|
||||||
|
|
Loading…
Reference in New Issue