From a80982851d3d7935bd4bc56f702bc0efed272f11 Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Sun, 29 Sep 2024 22:22:58 +0200 Subject: [PATCH] Fix allergen scraper --- server/scraper/resto/allergens.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/scraper/resto/allergens.py b/server/scraper/resto/allergens.py index 46e5b98c..94d42482 100755 --- a/server/scraper/resto/allergens.py +++ b/server/scraper/resto/allergens.py @@ -43,6 +43,8 @@ def parse_section_item(section_item: str) -> Union[dict[str, list[str]], None]: if "soep van de dag" in section_item: item_name = "Soep van de dag" item_allergen_list = section_item + elif ":" not in section_item: # Sometimes, it is just a message, so ignore it. + return None else: item_name, item_allergen_list = section_item.rsplit(":", maxsplit=1)