diff --git a/newswire.py b/newswire.py index b25267bfc..274b24ab3 100644 --- a/newswire.py +++ b/newswire.py @@ -471,7 +471,6 @@ def xml_podcast_to_dict(xml_str: str) -> {}: def _get_link_from_rss_item(rss_item: str) -> str: """Extracts rss link from rss item string """ - link = None if ' str: ('"audio/' in enclosure or '"video/' in enclosure): link_str = enclosure.split('url="')[1] if '"' in link_str: - link_str = link_str.split('"')[0] - if '://' in link_str: - link = link_str + link = link_str.split('"')[0] + if '://' in link: + return link - if not link: - link = rss_item.split('')[1] - link = link.split('')[0] - if '://' not in link: - return None + link = rss_item.split('')[1] + link = link.split('')[0] + if '://' not in link: + return None return link