From 95bfd678b0b2b222ee1b6f1b25b7bcb9f386f65e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Jun 2023 22:27:51 +0100 Subject: [PATCH] Use content field within atom feeds --- newswire.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/newswire.py b/newswire.py index ea1234705..f77cfa55d 100644 --- a/newswire.py +++ b/newswire.py @@ -988,6 +988,11 @@ def _atom_feed_to_dict(base_dir: str, domain: str, xml_str: str, description = atom_item.split('')[1] description = remove_html(description.split('')[0]) description = unescaped_text(description) + elif '' in atom_item: + description = atom_item.split('', 1)[1] + description = remove_html(description.split('')[0]) + description = unescaped_text(description) else: if '' in atom_item and \ '' in atom_item: @@ -1212,6 +1217,12 @@ def _atom_feed_yt_to_dict(base_dir: str, domain: str, xml_str: str, description = description.split('')[0] description = unescaped_text(description) description = remove_html(description) + elif '' in atom_item: + description = atom_item.split('', 1)[1] + description = description.split('')[0] + description = unescaped_text(description) + description = remove_html(description) link, _ = get_link_from_rss_item(atom_item, None, None) if not link: