From 78ef3bb43091a449589b11ec4bc702c63345918b Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 9 Jul 2022 00:51:06 +0000 Subject: [PATCH 1/3] bug fix in telegram.py --- telegram.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram.py b/telegram.py index 74ef36a..6ed57d2 100644 --- a/telegram.py +++ b/telegram.py @@ -31,7 +31,7 @@ class CommandProcessor: self.bot.infinity_polling() - def __command_help(self, message: Message): + def __command_help(self, message: Message, data: dict): self.bot.reply_to( message, 'Supported commands:\n' @@ -59,7 +59,7 @@ class CommandProcessor: feed_list = '' for index, feed in enumerate(feeds, start=1): - feed_list += '* ' + str(index) + ': ' + f'''{feed['title']}''' + '\n' + feed_list += str(index) + ': ' + f"{feed['url']}" + '\n' self.bot.reply_to(message, 'Your feeds:\n' + feed_list) @@ -132,7 +132,7 @@ class Notifier: return ( f"{item.title}\n\n" f"{item.date}\n" - f"{item.description}" + # f"{item.description}" ) -- 2.43.5 From f943f10c4db87d0fd46fae8d101e08cb73ce74dd Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 9 Jul 2022 00:53:14 +0000 Subject: [PATCH 2/3] bug fix in update.py - add load_dotenv --- update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.py b/update.py index c2c3624..48dca8d 100644 --- a/update.py +++ b/update.py @@ -3,6 +3,9 @@ from rss import RssReader from update_manager import UpdateManager from database import Database from telegram import Notifier +from dotenv import load_dotenv + +load_dotenv() token = os.getenv('TELEGRAM_TOKEN') db_path = os.getenv('DATABASE_PATH') -- 2.43.5 From 7e442de7333c9cc450ddecedd9fd43f92735a68e Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 9 Jul 2022 00:57:23 +0000 Subject: [PATCH 3/3] fix date parsing bug --- rss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rss.py b/rss.py index 514bb8d..02f9dad 100644 --- a/rss.py +++ b/rss.py @@ -7,7 +7,7 @@ class FeedItem: self.title = item.get('title', '') self.description = item.get('summary', '') if 'published' in item: - self.date = item.published_parsed() + self.date = item.published_parsed else: self.date = None -- 2.43.5