forked from DebaucheryLibrarian/traxxx
Optionalized qualities.
This commit is contained in:
parent
122dd3eaee
commit
a19a77e165
|
@ -43,6 +43,8 @@ function scrapeLatest(scenes, site) {
|
|||
cover,
|
||||
]];
|
||||
|
||||
console.log(release);
|
||||
|
||||
return release;
|
||||
});
|
||||
}
|
||||
|
@ -53,7 +55,7 @@ function scrapeLatestAlt(scenes, site) {
|
|||
|
||||
release.url = query.url('figure a', 'href', { origin: site.parameters.latest });
|
||||
|
||||
release.title = query.cnt('.has-text-weight-bold');
|
||||
release.title = query.cnt('.has-text-weight-bold, .is-size-6');
|
||||
release.date = query.date('span.tag', 'YYYY-MM-DD');
|
||||
release.actors = query.cnts('a.tag');
|
||||
|
||||
|
@ -62,7 +64,8 @@ function scrapeLatestAlt(scenes, site) {
|
|||
release.poster = cover.replace('poster_noplay', 'trailer_noplay');
|
||||
release.covers = [cover];
|
||||
|
||||
release.entryId = `${qu.formatDate(release.date, 'YYYY-MM-DD')}-${slugify(release.title)}`;
|
||||
release.entryId = `${qu.formatDate(release.date, 'YYYY-MM-DD')}-${slugify(release.title.split(/\s+/).slice(0, 5).join(' '))}`;
|
||||
console.log('alt', release);
|
||||
|
||||
return release;
|
||||
});
|
||||
|
@ -94,6 +97,8 @@ function scrapeScene({ query }, site) {
|
|||
const trailer = query.trailer();
|
||||
if (trailer) release.trailer = { src: trailer };
|
||||
|
||||
console.log(release);
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce
|
|||
date_precision: release.datePrecision,
|
||||
slug,
|
||||
description: release.description,
|
||||
qualities: release.qualities.map(Number).filter(Boolean),
|
||||
qualities: release.qualities?.map(Number).filter(Boolean),
|
||||
comment: release.comment,
|
||||
deep: typeof release.deep === 'boolean' ? release.deep : false,
|
||||
deep_url: release.deepUrl,
|
||||
|
@ -69,8 +69,6 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce
|
|||
curatedRelease.created_batch_id = batchId;
|
||||
}
|
||||
|
||||
console.log(curatedRelease);
|
||||
|
||||
return curatedRelease;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue