Adapted Score scraper for Score Classics.

This commit is contained in:
ThePendulum 2020-02-03 02:04:47 +01:00
parent b075adf424
commit a671190fff
4 changed files with 29 additions and 23 deletions

View File

@ -3451,18 +3451,12 @@ const sites = [
url: 'https://www.bigboobbundle.com/sarennasworld', url: 'https://www.bigboobbundle.com/sarennasworld',
network: 'score', network: 'score',
}, },
{
name: 'Score Classics',
slug: 'scoreclassics',
url: 'https://www.scoreclassics.com',
network: 'score',
priority: 1,
},
{ {
name: 'Scoreland', name: 'Scoreland',
slug: 'scoreland', slug: 'scoreland',
url: 'https://www.scoreland.com', url: 'https://www.scoreland.com',
network: 'score', network: 'score',
parameters: { path: '/big-boob-videos' },
priority: 3, priority: 3,
}, },
{ {
@ -3470,6 +3464,15 @@ const sites = [
slug: 'scoreland2', slug: 'scoreland2',
url: 'https://www.scoreland2.com', url: 'https://www.scoreland2.com',
network: 'score', network: 'score',
parameters: { path: '/big-boob-scenes' },
priority: 1,
},
{
name: 'Score Classics',
slug: 'scoreclassics',
url: 'https://www.scoreclassics.com',
network: 'score',
parameters: { path: '/classic-boob-videos' },
priority: 1, priority: 1,
}, },
{ {

View File

@ -428,7 +428,7 @@ async function storeReleases(releases) {
storeReleaseAssets(storedReleases), storeReleaseAssets(storedReleases),
]); ]);
if (argv.withProfiles) { if (argv.withProfiles && Object.keys(actors).length > 0) {
await scrapeBasicActors(); await scrapeBasicActors();
} }

View File

@ -45,7 +45,7 @@ async function scrapeUniqueReleases(scraper, site, afterDate = getAfterDate(), a
const uniqueReleases = latestReleases const uniqueReleases = latestReleases
.filter(release => !duplicateReleaseIds.has(String(release.entryId)) // release is already in database .filter(release => !duplicateReleaseIds.has(String(release.entryId)) // release is already in database
&& moment(release.date).isAfter(afterDate)); // release is older than specified date limit && (!release.date || moment(release.date).isAfter(afterDate))); // release is older than specified date limit
logger.info(`${site.name}: Scraped page ${page}, ${uniqueReleases.length} unique recent releases`); logger.info(`${site.name}: Scraped page ${page}, ${uniqueReleases.length} unique recent releases`);

View File

@ -65,7 +65,7 @@ function scrapeAll(html) {
} }
async function scrapeScene(html, url) { async function scrapeScene(html, url) {
const { q, qa, qtext, qd, ql, qu, qis, qp, qt } = ex(html, '#videos-page, #content'); const { q, qa, qtext, qi, qd, ql, qu, qis, qp, qt } = ex(html, '#videos-page, #content');
const release = {}; const release = {};
[release.entryId] = new URL(url).pathname.split('/').slice(-2); [release.entryId] = new URL(url).pathname.split('/').slice(-2);
@ -82,8 +82,8 @@ async function scrapeScene(html, url) {
const durationEl = qa('value').find(el => /\d{1,3}:\d{2}/.test(el.textContent)); const durationEl = qa('value').find(el => /\d{1,3}:\d{2}/.test(el.textContent));
release.duration = ql(durationEl); release.duration = ql(durationEl);
release.poster = qp('video'); // _800.jpg is larger than _xl.jpg in landscape release.poster = qp('video') || qi('.flowplayer img'); // _800.jpg is larger than _xl.jpg in landscape
const photosUrl = qu('a[href*=photos]'); const photosUrl = qu('.stat a[href*=photos]');
if (photosUrl) { if (photosUrl) {
release.photos = await fetchPhotos(photosUrl); release.photos = await fetchPhotos(photosUrl);
@ -92,6 +92,8 @@ async function scrapeScene(html, url) {
} }
const trailer = qt(); const trailer = qt();
if (trailer) {
release.trailer = [ release.trailer = [
{ {
// don't rely on trailer always being 720p by default // don't rely on trailer always being 720p by default
@ -103,6 +105,7 @@ async function scrapeScene(html, url) {
quality: 360, quality: 360,
}, },
]; ];
}
const stars = q('.rate-box').dataset.score; const stars = q('.rate-box').dataset.score;
if (stars) release.rating = { stars }; if (stars) release.rating = { stars };