diff --git a/telegram-moviebot/telegram-moviebot.py b/telegram-moviebot/telegram-moviebot.py index 4a46940..391fee5 100644 --- a/telegram-moviebot/telegram-moviebot.py +++ b/telegram-moviebot/telegram-moviebot.py @@ -70,6 +70,7 @@ def movie_lookup(movie): if movie_id == "404": tg_reply = ("I'm having trouble finding that movie\. " + "Check your spelling and try again\.") + logger.info('Movie not found in TMDB.') similarity = 0 return tg_reply, similarity @@ -77,6 +78,7 @@ def movie_lookup(movie): if sa_response == "404": tg_reply = ("I'm having trouble finding that movie\. " + "Check your spelling and try again\.") + logger.info('Movie not found by the Streaming Availability API.') similarity = 0 return tg_reply, similarity @@ -119,6 +121,7 @@ def input_movie(update: Update, context: CallbackContext): context.bot.send_message(chat_id=update.effective_chat.id, text=movie_info, parse_mode=ParseMode.MARKDOWN_V2) if similarity < .80 and similarity != 0: + logger.info("Result accuracy was below the threshold. Sending follow-up message.") followup_msg = ("Not the movie you're looking for? " + "Try adding '\-year' followed by the release year after the title\.") context.bot.send_message(chat_id=update.effective_chat.id,