Skip to content

Commit

Permalink
Merge pull request #62 from dplocki/61-non-existing-feed-does-not-cau…
Browse files Browse the repository at this point in the history
…se-error

61 non existing feed does not cause error
  • Loading branch information
dplocki authored Mar 27, 2024
2 parents 6a77ed4 + 30cad1f commit 7aeae42
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions podcast_downloader/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,19 @@ def configuration_to_function_rss_to_name(
)

if rss_disable:
logger.info('Skipping the "%s"', rss_source_name)
logger.info('Skipping the "%s"', rss_source_name or rss_source_link)
continue

try:
feed = load_feed(rss_source_link)
if not rss_source_name:
rss_source_name = get_feed_title_from_feed(feed)

except error:
logger.error(f"Error while checking the link: '{rss_source_link}': {error}")
feed = load_feed(rss_source_link)
if feed.bozo and len(feed.entries) == 0:
logger.error(
f"Error while checking the link: '{rss_source_link}': {feed['bozo_exception']}"
)
continue

if not rss_source_name:
rss_source_name = get_feed_title_from_feed(feed)

logger.info('Checking "%s"', rss_source_name)

to_name_function = configuration_to_function_rss_to_name(
Expand Down

0 comments on commit 7aeae42

Please sign in to comment.