Added profile releases for classic Fame Digital sites (Silvia Saint and Silverstone DVD).
This commit is contained in:
@@ -110,7 +110,7 @@ async function scrapeApiReleases(json, site) {
|
||||
});
|
||||
}
|
||||
|
||||
function scrapeAll(html, site, networkUrl) {
|
||||
function scrapeAll(html, site, networkUrl, hasTeaser = true) {
|
||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||
const scenesElements = $('li[data-itemtype=scene]').toArray();
|
||||
|
||||
@@ -146,10 +146,12 @@ function scrapeAll(html, site, networkUrl) {
|
||||
const posterEl = $(element).find('.imgLink img');
|
||||
if (posterEl) release.poster = posterEl.attr('data-original') || posterEl.attr('src');
|
||||
|
||||
release.teaser = {
|
||||
src: `https://videothumb.gammacdn.com/307x224/${release.entryId}.mp4`,
|
||||
quality: 224,
|
||||
};
|
||||
if (hasTeaser) {
|
||||
release.teaser = {
|
||||
src: `https://videothumb.gammacdn.com/307x224/${release.entryId}.mp4`,
|
||||
quality: 224,
|
||||
};
|
||||
}
|
||||
|
||||
return release;
|
||||
});
|
||||
@@ -166,7 +168,7 @@ async function scrapeScene(html, url, site) {
|
||||
const videoData = JSON.parse(videoJson.slice(videoJson.indexOf('{'), videoJson.indexOf('};') + 1));
|
||||
|
||||
[release.entryId] = new URL(url).pathname.split('/').slice(-1);
|
||||
release.title = data?.name || videoData.playerOptions.sceneInfos.sceneTitle;
|
||||
release.title = videoData?.playerOptions?.sceneInfos.sceneTitle || data?.name;
|
||||
|
||||
// date in data object is not the release date of the scene, but the date the entry was added; only use as fallback
|
||||
const dateString = $('.updatedDate').first().text().trim();
|
||||
|
||||
Reference in New Issue
Block a user