From 8a99b2ddf7e1fca1db5287749d350b95e9b81df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Tue, 20 Dec 2022 15:51:38 +0100 Subject: [PATCH] Except more stuff --- discord_rss_bot/feeds.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/discord_rss_bot/feeds.py b/discord_rss_bot/feeds.py index 145d6fb..6d5cba9 100644 --- a/discord_rss_bot/feeds.py +++ b/discord_rss_bot/feeds.py @@ -73,27 +73,43 @@ def send_to_discord(custom_reader: Reader | None = None, feed=None, do_once=Fals whitelist_title = reader.get_tag(feed, "whitelist_title") except TagNotFoundError: whitelist_title = "" + except ValueError: + whitelist_title = "" + try: whitelist_summary = reader.get_tag(feed, "whitelist_summary") except TagNotFoundError: whitelist_summary = "" + except ValueError: + whitelist_summary = "" + try: whitelist_content = reader.get_tag(feed, "whitelist_content") except TagNotFoundError: whitelist_content = "" + except ValueError: + whitelist_content = "" try: blacklist_title = reader.get_tag(feed, "blacklist_title") except TagNotFoundError: blacklist_title = "" + except ValueError: + blacklist_title = "" + try: blacklist_summary = reader.get_tag(feed, "blacklist_summary") except TagNotFoundError: blacklist_summary = "" + except ValueError: + blacklist_summary = "" + try: blacklist_content = reader.get_tag(feed, "blacklist_content") except TagNotFoundError: blacklist_content = "" + except ValueError: + blacklist_content = "" # Check if the entry should be sent. If on the blacklist, mark as read and continue. if whitelist_title: