Skip to content

Commit

Permalink
Support Ardoyen URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Jun 19, 2024
1 parent 1606b94 commit 9dac40a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions server/scraper/resto/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+)$")
Expand All @@ -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.
Expand Down Expand Up @@ -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 = []
Expand Down

0 comments on commit 9dac40a

Please sign in to comment.