mirror of https://gitlab.com/bashrc2/epicyon
Transcript items
parent
e3b6a3c9f2
commit
05f1359af3
|
|
@ -143,15 +143,17 @@ def _html_podcast_transcripts(podcast_properties: {}, translate: {}) -> str:
|
||||||
return ''
|
return ''
|
||||||
ctr: int = 1
|
ctr: int = 1
|
||||||
html_str: str = ''
|
html_str: str = ''
|
||||||
for _ in podcast_properties[key]:
|
for item in podcast_properties[key]:
|
||||||
|
if not isinstance(item, dict):
|
||||||
|
continue
|
||||||
transcript_url: str = None
|
transcript_url: str = None
|
||||||
if podcast_properties[key].get('url'):
|
if item.get('url'):
|
||||||
url_str: str = get_url_from_post(podcast_properties[key]['url'])
|
url_str: str = get_url_from_post(item['url'])
|
||||||
if url_str:
|
if url_str:
|
||||||
transcript_url = remove_html(url_str)
|
transcript_url = remove_html(url_str)
|
||||||
elif podcast_properties[key].get('uri'):
|
elif item.get('uri'):
|
||||||
if isinstance(podcast_properties[key]['uri'], str):
|
if isinstance(item['uri'], str):
|
||||||
transcript_url = podcast_properties[key]['uri']
|
transcript_url = item['uri']
|
||||||
if not transcript_url:
|
if not transcript_url:
|
||||||
continue
|
continue
|
||||||
if ctr > 1:
|
if ctr > 1:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue