forked from DebaucheryLibrarian/traxxx
Added release page with photo viewer. Added photo count to database. Improved styling.
This commit is contained in:
@@ -11,9 +11,9 @@ function scrapeLatest(html, site) {
|
||||
const scenesElements = $('.update_details').toArray();
|
||||
|
||||
return scenesElements.map((element) => {
|
||||
const thumbnailElement = $(element).find('a img.thumbs');
|
||||
const thumbnailCount = Number(thumbnailElement.attr('cnt'));
|
||||
const thumbnails = Array.from({ length: thumbnailCount }, (value, index) => thumbnailElement.attr(`src${index}_1x`)).filter(thumbnailUrl => thumbnailUrl !== undefined);
|
||||
const photoElement = $(element).find('a img.thumbs');
|
||||
const photoCount = Number(photoElement.attr('cnt'));
|
||||
const photos = Array.from({ length: photoCount }, (value, index) => photoElement.attr(`src${index}_1x`)).filter(photoUrl => photoUrl !== undefined);
|
||||
|
||||
const sceneLinkElement = $(element).children('a').eq(1);
|
||||
const url = sceneLinkElement.attr('href');
|
||||
@@ -36,7 +36,7 @@ function scrapeLatest(html, site) {
|
||||
actors,
|
||||
date,
|
||||
site,
|
||||
thumbnails,
|
||||
photos,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -46,9 +46,9 @@ function scrapeUpcoming(html, site) {
|
||||
const scenesElements = $('#coming_soon_carousel').find('.table').toArray();
|
||||
|
||||
return scenesElements.map((element) => {
|
||||
const thumbnailElement = $(element).find('a img.thumbs');
|
||||
const thumbnailCount = Number(thumbnailElement.attr('cnt'));
|
||||
const thumbnails = Array.from({ length: thumbnailCount }, (value, index) => thumbnailElement.attr(`src${index}_1x`)).filter(thumbnailUrl => thumbnailUrl !== undefined);
|
||||
const photoElement = $(element).find('a img.thumbs');
|
||||
const photoCount = Number(photoElement.attr('cnt'));
|
||||
const photos = Array.from({ length: photoCount }, (value, index) => photoElement.attr(`src${index}_1x`)).filter(photoUrl => photoUrl !== undefined);
|
||||
|
||||
const shootId = $(element).find('.upcoming_updates_thumb').attr('id').match(/\d+/)[0];
|
||||
|
||||
@@ -77,7 +77,7 @@ function scrapeUpcoming(html, site) {
|
||||
title,
|
||||
date,
|
||||
actors,
|
||||
thumbnails,
|
||||
photos,
|
||||
rating: null,
|
||||
site,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user