diff --git a/scrape/parse.js b/scrape/parse.js index 021c947..b46b7c0 100644 --- a/scrape/parse.js +++ b/scrape/parse.js @@ -69,7 +69,7 @@ function parseThisShit(downloadedFilePath) { let d = true; try { - if (currentSheet[key]["w"].startsWith("úklid")) { + if (currentSheet[key]["w"].startsWith("úklid") || currentSheet[key]["w"].trim().length == 0) { d = false; } } catch {} @@ -107,7 +107,9 @@ function parseThisShit(downloadedFilePath) { const isPriprava = /priprava/i.test(str); return { - date: date ? date.toISOString().slice(0,10) : null, // ISO yyyy-mm-dd string for easy use + date: date + ? `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}` + : null, priprava: isPriprava, }; }),