mirror of https://gitlab.com/bashrc2/epicyon
Use content field within atom feeds
parent
4d447f3cbc
commit
95bfd678b0
11
newswire.py
11
newswire.py
|
@ -988,6 +988,11 @@ def _atom_feed_to_dict(base_dir: str, domain: str, xml_str: str,
|
|||
description = atom_item.split('<summary>')[1]
|
||||
description = remove_html(description.split('</summary>')[0])
|
||||
description = unescaped_text(description)
|
||||
elif '<content' in atom_item and '</content>' in atom_item:
|
||||
description = atom_item.split('<content', 1)[1]
|
||||
description = description.split('>', 1)[1]
|
||||
description = remove_html(description.split('</content>')[0])
|
||||
description = unescaped_text(description)
|
||||
else:
|
||||
if '<media:description>' in atom_item and \
|
||||
'</media:description>' in atom_item:
|
||||
|
@ -1212,6 +1217,12 @@ def _atom_feed_yt_to_dict(base_dir: str, domain: str, xml_str: str,
|
|||
description = description.split('</summary>')[0]
|
||||
description = unescaped_text(description)
|
||||
description = remove_html(description)
|
||||
elif '<content' in atom_item and '</content>' in atom_item:
|
||||
description = atom_item.split('<content', 1)[1]
|
||||
description = description.split('>', 1)[1]
|
||||
description = description.split('</content>')[0]
|
||||
description = unescaped_text(description)
|
||||
description = remove_html(description)
|
||||
|
||||
link, _ = get_link_from_rss_item(atom_item, None, None)
|
||||
if not link:
|
||||
|
|
Loading…
Reference in New Issue