Added puppeteer to http module, refactored Kink scraper to utilize it.

This commit is contained in:
DebaucheryLibrarian
2022-12-28 01:34:12 +01:00
parent 17feadbc15
commit 74214bc060
14 changed files with 537 additions and 62 deletions

View File

@@ -221,10 +221,14 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') {
async function scrapeReleases(baseReleases, entitiesBySlug, type) {
const entitiesWithBeforeDataEntries = await Promise.all(Object.entries(entitiesBySlug).map(async ([slug, entity]) => {
console.log('scraper', entity.scraper?.beforeFetchScenes);
if (entity.scraper?.beforeFetchScenes) {
const parameters = getRecursiveParameters(entity);
const preData = await entity.scraper.beforeFetchScenes(entity, parameters);
console.log('pre data', preData);
return [slug, { ...entity, preData }];
}