From 8e52c437effb02f666f4647360566ee1fc486458 Mon Sep 17 00:00:00 2001 From: Nick Leeman Date: Fri, 26 Mar 2021 15:04:55 +0100 Subject: [PATCH] fix --- src/core.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core.ts b/src/core.ts index 8fd913d..f3de40a 100644 --- a/src/core.ts +++ b/src/core.ts @@ -34,15 +34,15 @@ import { Coolblue } from "./modules/websites"; -start(); -// debugStart(); - // Globals let browser: puppeteer.Browser = null; let sitemapUrl: string = ""; let allProducts: Array = []; let allBlogUrls: Array = []; +// debugStart(); +start(); + async function debugStart() { browser = await puppeteer.launch({ headless: false }); console.log(await crawlProductStock("https://www.coolblue.nl/product/829953/cardo-scala-rider-freecom-4-plus-single.html")); @@ -294,9 +294,9 @@ async function generateReport() { console.log("Generating report..."); let today: Date = new Date(); - let datecode: string = today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDay().toString(); + let datecode: string = today.getFullYear().toString() + "-" + (today.getMonth() + 1).toString() + "-" + today.getDay().toString(); let domain: string = getDomain(sitemapUrl); - let file = `${domain}-${datecode}-report.txt`; + let file = `${domain}_${datecode}_report.txt`; let totalProducts = 0; let totalOutStock = 0;