From 39a0c7ba9ee72816b3480d84ca136f4d7840f2e7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 12 Feb 2021 12:02:09 +0000 Subject: [PATCH] Remove html from json feeds --- newswire.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newswire.py b/newswire.py index a9d2b58b1..777f31c22 100644 --- a/newswire.py +++ b/newswire.py @@ -550,7 +550,7 @@ def _jsonFeedV1ToDict(baseDir: str, domain: str, xmlStr: str, else: if not isinstance(jsonFeedItem['content_text'], str): continue - title = jsonFeedItem['content_text'] + title = removeHtml(jsonFeedItem['content_text']) if len(title) > maxBytes: print('WARN: json feed title is too long') continue @@ -558,7 +558,7 @@ def _jsonFeedV1ToDict(baseDir: str, domain: str, xmlStr: str, if jsonFeedItem.get('description'): if not isinstance(jsonFeedItem['description'], str): continue - description = jsonFeedItem['description'] + description = removeHtml(jsonFeedItem['description']) if len(description) > maxBytes: print('WARN: json feed description is too long') continue