Compare commits

..

No commits in common. "eb6337f6fbffea3185a887a902dc38dbeda3ed1e" and "471f8f2bec2d913b4c7d1a00efbc0bb42dcced4b" have entirely different histories.

3 changed files with 21 additions and 14 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.128.6",
"version": "1.128.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

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

View File

@ -186,41 +186,48 @@ function scrapeUpcoming(html, site) {
const scenesElements = $('#coming_soon_carousel').find('.table').toArray();
return scenesElements.map((element) => {
const release = {};
release.entryId = $(element).find('.upcoming_updates_thumb').attr('id').match(/\d+/)[0];
const entryId = $(element).find('.upcoming_updates_thumb').attr('id').match(/\d+/)[0];
const details = $(element).find('.update_details_comingsoon')
.eq(1)
.children()
.remove();
release.title = details
const title = details
.end()
.text()
.trim();
release.actors = details
const actors = details
.text()
.trim()
.split(', ');
release.date = moment
const date = moment
.utc($(element).find('.update_date_comingsoon').text().slice(7), 'MM/DD/YYYY')
.toDate();
const photoElement = $(element).find('a img.thumbs');
const posterPath = photoElement.attr('src');
release.poster = posterPath.match(/^http/) ? posterPath : `${site.url}${posterPath}`;
const poster = posterPath.match(/^http/) ? posterPath : `${site.url}${posterPath}`;
const videoClass = $(element).find('.update_thumbnail div').attr('class');
const videoScript = $(element).find(`script:contains(${videoClass})`).html();
const teaser = videoScript.slice(videoScript.indexOf('https://'), videoScript.indexOf('.mp4') + 4);
if (videoScript) {
release.teaser = videoScript.slice(videoScript.indexOf('https://'), videoScript.indexOf('.mp4') + 4);
}
return release;
return {
url: null,
entryId,
title,
date,
actors,
poster,
teaser: {
src: teaser,
},
rating: null,
site,
};
});
}