diff --git a/app.py b/app.py index fba1d47..fca8ec8 100644 --- a/app.py +++ b/app.py @@ -56,14 +56,15 @@ def main(): message_body = '' if available_center_list: for center in available_center_list: - msg = f"""Location: {center.get('location')} + if center.get('min_age_limit') < AGE: + msg = f"""Location: {center.get('location')} Available Capacity: {center.get('available_capacity')} Available Slots: {center.get('available_slots')} Vaccine: {center.get('vaccine')} Age Limit: {center.get('min_age_limit')} Fee: {center.get('fee_type')}\n\n""" - message_body += msg - break # to prevent too long messages + message_body += msg + break # to prevent too long messages msg = message_header + message_body + message_footer bot.sendMessage(chat_id=TELEGRAM_CHAT_ID, text=msg, parse_mode='markdown') time.sleep(SLEEP_TIME_SEC)