Fix food api url, remove resto option

This commit is contained in:
Stijn De Clercq 2021-11-05 23:36:12 +01:00
parent 3c52d681b3
commit f052885ae0
3 changed files with 8 additions and 16 deletions

View file

@ -24,7 +24,7 @@ def get_type(menu: Dict, type_: str) -> str:
return acc
def etenScript(dag: datetime, resto: str = "sterre"):
def etenScript(dag: datetime):
# What day
menuSoep = ""
menuHoofdgerechten = ""
@ -33,7 +33,7 @@ def etenScript(dag: datetime, resto: str = "sterre"):
# Fetch from API
try:
menu = requests.get(f"https://zeus.ugent.be/hydra/api/2.0/resto/menu/nl-{resto}/{dag.year}/{dag.month}/{dag.day}.json").json()
menu = requests.get(f"https://zeus.ugent.be/hydra/api/2.0/resto/menu/nl/{dag.year}/{dag.month}/{dag.day}.json").json()
if not menu["meals"]:
raise Exception()