From c05b569ce69aadbf1d9f12d5abecab3fae81be09 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 14 Jan 2022 18:05:29 +0000 Subject: [PATCH] Tidying --- newswire.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/newswire.py b/newswire.py index 2aba075f3..87ac339b3 100644 --- a/newswire.py +++ b/newswire.py @@ -441,7 +441,8 @@ def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}: """ if ' {}: episode_image = episode_image.split('"')[0] podcast_episode_image = episode_image break - else: - if '>' in episode_image: - episode_image = episode_image.split('>')[1] - if '<' in episode_image: - episode_image = episode_image.split('<')[0] - if '://' in episode_image and '.' in episode_image: - podcast_episode_image = episode_image - break + elif '>' in episode_image: + episode_image = episode_image.split('>')[1] + if '<' in episode_image: + episode_image = episode_image.split('<')[0] + if '://' in episode_image and '.' in episode_image: + podcast_episode_image = episode_image + break # get categories if they exist. These can be turned into hashtags podcast_categories = _get_podcast_categories(xml_item, xml_str)