From 3e5281f80d9f26c61ce5c32b70d510abc5c4ab16 Mon Sep 17 00:00:00 2001 From: Juned KH Date: Mon, 3 Oct 2022 10:37:10 +0530 Subject: [PATCH] Update rss.py --- bot/modules/rss.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot/modules/rss.py b/bot/modules/rss.py index 50112fe7722..7afdd3c18aa 100644 --- a/bot/modules/rss.py +++ b/bot/modules/rss.py @@ -9,7 +9,7 @@ from bot.helper.telegram_helper.filters import CustomFilters from bot.helper.telegram_helper.bot_commands import BotCommands from bot.helper.ext_utils.db_handler import DbManger -from bot.helper.telegram_helper import button_build +from bot.helper.telegram_helper.button_build import ButtonMaker rss_dict_lock = Lock() @@ -133,14 +133,14 @@ def rss_unsub(update, context): sendMessage(f"Use this format to remove feed url:\n/{BotCommands.RssUnSubCommand[0]} Title", context.bot, update.message) def rss_settings(update, context): - buttons = button_build.ButtonMaker() + buttons = ButtonMaker() buttons.sbutton("Unsubscribe All", "rss unsuball") if rss_job.enabled: buttons.sbutton("Pause", "rss pause") else: buttons.sbutton("Start", "rss start") if AUTO_DELETE_MESSAGE_DURATION == -1: - buttons.sbutton("Close", f"rss close") + buttons.sbutton("Close", "rss close") button = buttons.build_menu(1) setting = sendMarkup('Rss Settings', context.bot, update.message, button) Thread(target=auto_delete_message, args=(context.bot, update.message, setting)).start() @@ -203,7 +203,7 @@ def rss_monitor(context): break parse = True for list in data['filters']: - if not any(x in str(rss_d.entries[feed_count]['title']).lower() for x in list): + if all(x not in str(rss_d.entries[feed_count]['title']).lower() for x in list): parse = False feed_count += 1 break @@ -225,7 +225,7 @@ def rss_monitor(context): rss_dict[title].update({'last_feed': last_link, 'last_title': last_title}) DbManger().rss_update(title) LOGGER.info(f"Feed Name: {title}") - LOGGER.info(f"Last item: {last_feed}") + LOGGER.info(f"Last item: {last_link}") except Exception as e: LOGGER.error(f"{e} Feed Name: {title} - Feed Link: {data['link']}") continue