Browse Source

add lunchbox

master
angerstoner 3 years ago
parent
commit
1cbb9280d2
  1. 7
      src/mensa.py

7
src/mensa.py

@ -24,7 +24,8 @@ MENSA_URL = {
"linux": "goe2", "linux": "goe2",
"nord": "goe3", "nord": "goe3",
"italia": "goe4", "italia": "goe4",
"fasthochschule": "goe5"
"fasthochschule": "goe5",
"lunchbox": "goe7"
} }
MENSA_NAME = { MENSA_NAME = {
@ -33,7 +34,8 @@ MENSA_NAME = {
"turm": "Turmmensa", "turm": "Turmmensa",
"linux": "Linuxmensa", "linux": "Linuxmensa",
"italia": "Mensa Italia", "italia": "Mensa Italia",
"fasthochschule": "Bistro Fasthochschule"
"fasthochschule": "Bistro Fasthochschule",
"lunchbox": "Lunchbox (Nordmensa-Ersatz)"
} }
HIDE_CATEGORIES_LIGHT = { HIDE_CATEGORIES_LIGHT = {
@ -110,6 +112,7 @@ def mensa(update: Update, context: CallbackContext):
return return
url = "https://app.mensaplan.de/api/11102/de.mensaplan.app.android.goettingen/%s.json" % MENSA_URL[which] url = "https://app.mensaplan.de/api/11102/de.mensaplan.app.android.goettingen/%s.json" % MENSA_URL[which]
request = requests.get(url) request = requests.get(url)
request.encoding = 'utf-8' request.encoding = 'utf-8'
data = request.json() data = request.json()

Loading…
Cancel
Save