Telegram bot libraries and requests for text to speech and function
# Use requests to get the contents of the website # related to the comic and BeautifulSoup to parse # the data returned from requests import requests from bs4 import BeautifulSoup # Import the modules we need to play the audio from IPython.display import Audio import IPython # Import the Telegram libraries we need from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove) from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, RegexHandler, ConversationHandler) # Enable logging import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) # Define the different states a chat can be in MENU, TEXT, AUDIO = range(3) # Start the conversation in the MENU state def start(bot, update): reply_keyboard = [['Text', 'Audio'