From 9dac40a1f2dbb981cdbd7445d49e20c5ca171e8b Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Wed, 19 Jun 2024 13:40:10 +0200 Subject: [PATCH] Support Ardoyen URLs --- server/scraper/resto/menu.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/server/scraper/resto/menu.py b/server/scraper/resto/menu.py index 9f92885e..ad3fbcc2 100755 --- a/server/scraper/resto/menu.py +++ b/server/scraper/resto/menu.py @@ -34,7 +34,8 @@ "nl": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu", "nl-sterre": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu", "nl-debrug": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu", - "nl-coupure": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu" + "nl-coupure": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu", + "nl-ardoyen": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu" } NORMAL_WEEK = re.compile(r"week(\d+)$") @@ -50,10 +51,10 @@ # which is very useful. # TODO: there is currently no "nl" endpoint, so this is pointless. COPIED_ENDPOINTS = { - "nl-debrug": "nl", - "nl-coupure": "nl", - "nl-sterre": "nl", - "nl-ardoyen": "nl", + # "nl-debrug": "nl", + # "nl-coupure": "nl", + # "nl-sterre": "nl", + # "nl-ardoyen": "nl", } # Day names to day of the week. @@ -321,6 +322,7 @@ def get_day_menu(which, url, allergens: Dict[str, str]): # - Vegan and vegetarian is indicated by either the old system (KIND: name - price) # or the new system (name - KIND - price). The kind is optional; if not present, meat is assumed (in the new # system) + print(f"Getting {url}") day_menu = pq(url=url) vegetables = [] vegetables2 = []