mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
e539d3afc0
commit
c05b569ce6
18
newswire.py
18
newswire.py
|
@ -441,7 +441,8 @@ def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}:
|
||||||
"""
|
"""
|
||||||
if '<podcast:' not in xml_item:
|
if '<podcast:' not in xml_item:
|
||||||
if '<itunes:' not in xml_item:
|
if '<itunes:' not in xml_item:
|
||||||
return {}
|
if '<media:thumbnail' not in xml_item:
|
||||||
|
return {}
|
||||||
|
|
||||||
podcast_properties = {
|
podcast_properties = {
|
||||||
"locations": [],
|
"locations": [],
|
||||||
|
@ -525,14 +526,13 @@ def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}:
|
||||||
episode_image = episode_image.split('"')[0]
|
episode_image = episode_image.split('"')[0]
|
||||||
podcast_episode_image = episode_image
|
podcast_episode_image = episode_image
|
||||||
break
|
break
|
||||||
else:
|
elif '>' in episode_image:
|
||||||
if '>' in episode_image:
|
episode_image = episode_image.split('>')[1]
|
||||||
episode_image = episode_image.split('>')[1]
|
if '<' in episode_image:
|
||||||
if '<' in episode_image:
|
episode_image = episode_image.split('<')[0]
|
||||||
episode_image = episode_image.split('<')[0]
|
if '://' in episode_image and '.' in episode_image:
|
||||||
if '://' in episode_image and '.' in episode_image:
|
podcast_episode_image = episode_image
|
||||||
podcast_episode_image = episode_image
|
break
|
||||||
break
|
|
||||||
|
|
||||||
# get categories if they exist. These can be turned into hashtags
|
# get categories if they exist. These can be turned into hashtags
|
||||||
podcast_categories = _get_podcast_categories(xml_item, xml_str)
|
podcast_categories = _get_podcast_categories(xml_item, xml_str)
|
||||||
|
|
Loading…
Reference in New Issue