|
@ -119,6 +119,7 @@ def mensa(update: Update, context: CallbackContext): |
|
|
else: |
|
|
else: |
|
|
message = "Das Essen für %s in der %s \n\n" % (today_data["date"], MENSA_NAME[which]) |
|
|
message = "Das Essen für %s in der %s \n\n" % (today_data["date"], MENSA_NAME[which]) |
|
|
for cat in today_data['categories']: |
|
|
for cat in today_data['categories']: |
|
|
|
|
|
try: |
|
|
label = cat['name'] |
|
|
label = cat['name'] |
|
|
meals = cat['meals'] |
|
|
meals = cat['meals'] |
|
|
if label not in filter_categories and ( |
|
|
if label not in filter_categories and ( |
|
@ -129,6 +130,8 @@ def mensa(update: Update, context: CallbackContext): |
|
|
for meal in meals: |
|
|
for meal in meals: |
|
|
meal_line += meal['name'].strip() + "\n" |
|
|
meal_line += meal['name'].strip() + "\n" |
|
|
message += meal_line + '\n' |
|
|
message += meal_line + '\n' |
|
|
|
|
|
except: # TODO: catch correct exception |
|
|
|
|
|
print("Could not fetch meal. Skipping.") |
|
|
|
|
|
|
|
|
update.message.reply_text(message, ParseMode.MARKDOWN) |
|
|
update.message.reply_text(message, ParseMode.MARKDOWN) |
|
|
|
|
|
|
|
|