Compare commits
2 Commits
471f8f2bec
...
eb6337f6fb
Author | SHA1 | Date |
---|---|---|
|
eb6337f6fb | |
|
9499cd0265 |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.128.5",
|
||||
"version": "1.128.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.128.5",
|
||||
"version": "1.128.6",
|
||||
"description": "All the latest porn releases in one place",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -186,48 +186,41 @@ function scrapeUpcoming(html, site) {
|
|||
const scenesElements = $('#coming_soon_carousel').find('.table').toArray();
|
||||
|
||||
return scenesElements.map((element) => {
|
||||
const entryId = $(element).find('.upcoming_updates_thumb').attr('id').match(/\d+/)[0];
|
||||
const release = {};
|
||||
|
||||
release.entryId = $(element).find('.upcoming_updates_thumb').attr('id').match(/\d+/)[0];
|
||||
|
||||
const details = $(element).find('.update_details_comingsoon')
|
||||
.eq(1)
|
||||
.children()
|
||||
.remove();
|
||||
|
||||
const title = details
|
||||
release.title = details
|
||||
.end()
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
const actors = details
|
||||
release.actors = details
|
||||
.text()
|
||||
.trim()
|
||||
.split(', ');
|
||||
|
||||
const date = moment
|
||||
release.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');
|
||||
const poster = posterPath.match(/^http/) ? posterPath : `${site.url}${posterPath}`;
|
||||
release.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);
|
||||
|
||||
return {
|
||||
url: null,
|
||||
entryId,
|
||||
title,
|
||||
date,
|
||||
actors,
|
||||
poster,
|
||||
teaser: {
|
||||
src: teaser,
|
||||
},
|
||||
rating: null,
|
||||
site,
|
||||
};
|
||||
if (videoScript) {
|
||||
release.teaser = videoScript.slice(videoScript.indexOf('https://'), videoScript.indexOf('.mp4') + 4);
|
||||
}
|
||||
|
||||
return release;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue