From 24fadc81cd80a3781b40c6afc7b088161a9d1991 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 31 Aug 2023 10:02:20 +0900 Subject: Strip HTML tags from fetched texts --- src/fead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fead.py b/src/fead.py index a900fce..81b959c 100755 --- a/src/fead.py +++ b/src/fead.py @@ -116,7 +116,7 @@ def unparse_atom_text(xml): assert len(xml) == 1 and xml[0].tag.endswith(f'{XHTML_NS}div') for elem in xml[0].iter(): elem.tag = elem.tag[len(XHTML_NS):] - return unparse_xml(xml[0]).decode() + return HTML_TAG.sub('', unparse_xml(xml[0]).decode()) return xml.text -- cgit 1.4.1