def ultimissime(bot, update):
"""Defining function that prints 5 news from ultimissime"""
news_to_string = ""
for i, item in enumerate(utils.NEWS['univaq'][5:10]):
news_to_string += (str(i + 1) + ' - <a href="{link}">{title}</a>\n\n').format(**item)
news_to_string += ('<a href="http://www.univaq.it">'
'Vedi le altre notizie</a> e attiva le notifiche con /newson per '
'restare sempre aggiornato')
bot.sendMessage(update.message.chat_id,
parse_mode='HTML', disable_web_page_preview=True, text=news_to_string,
reply_markup=telegram.ReplyKeyboardRemove())
return ConversationHandler.END
评论列表
文章目录