From 0f2d56eafd01b5e728f96cf327f1a3e881a21225 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 5 Nov 2022 13:07:11 +0200 Subject: Hid vegetarian food when it is the same as the normal food. Added date logging to init.sh. --- food.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'food.js') diff --git a/food.js b/food.js index 7a9691d..8de8dcd 100644 --- a/food.js +++ b/food.js @@ -3,8 +3,8 @@ const open = require("./Functions/open.js"); const { weekdayToNumber } = require("./Functions/dateFuncs.js"); function* scrapeFood(data) -{ - const foodRegex = /(\w{2} (?:\d\d?\.){2}\d{4})<\/title><description><!\[CDATA\[(Lounas) ?:? ?(.*?)(Kasvislounas) ?:? ?(.*?)]]><\/description>/gm; +{ + const foodRegex = /<title>(\w{2} (?:\d\d?\.){2}\d{4})<\/title><description><!\[CDATA\[(Lounas) ?:? ?(.*?)<br>(Kasvislounas) ?:? ?(.*?)]]><\/description>/ const foods = data.matchAll(foodRegex); for(const food of foods) { -- cgit v1.2.3