fix: remove rawHtml properly

This commit is contained in:
Gergő Móricz 2024-08-20 22:51:12 +02:00
parent 1368f9a87f
commit 5818236659

View File

@ -45,6 +45,9 @@ export async function startWebScraperPipeline({
},
onSuccess: (result, mode) => {
Logger.debug(`🐂 Job completed ${job.id}`);
if (job.data.crawl_id && (!job.data.pageOptions || !job.data.pageOptions.includeRawHtml)) {
delete result[0].rawHtml;
}
saveJob(job, result, token, mode);
},
onError: (error) => {