mirror of https://gitlab.com/bashrc2/epicyon
Remove html from json feeds
parent
c74b208b53
commit
39a0c7ba9e
|
@ -550,7 +550,7 @@ def _jsonFeedV1ToDict(baseDir: str, domain: str, xmlStr: str,
|
||||||
else:
|
else:
|
||||||
if not isinstance(jsonFeedItem['content_text'], str):
|
if not isinstance(jsonFeedItem['content_text'], str):
|
||||||
continue
|
continue
|
||||||
title = jsonFeedItem['content_text']
|
title = removeHtml(jsonFeedItem['content_text'])
|
||||||
if len(title) > maxBytes:
|
if len(title) > maxBytes:
|
||||||
print('WARN: json feed title is too long')
|
print('WARN: json feed title is too long')
|
||||||
continue
|
continue
|
||||||
|
@ -558,7 +558,7 @@ def _jsonFeedV1ToDict(baseDir: str, domain: str, xmlStr: str,
|
||||||
if jsonFeedItem.get('description'):
|
if jsonFeedItem.get('description'):
|
||||||
if not isinstance(jsonFeedItem['description'], str):
|
if not isinstance(jsonFeedItem['description'], str):
|
||||||
continue
|
continue
|
||||||
description = jsonFeedItem['description']
|
description = removeHtml(jsonFeedItem['description'])
|
||||||
if len(description) > maxBytes:
|
if len(description) > maxBytes:
|
||||||
print('WARN: json feed description is too long')
|
print('WARN: json feed description is too long')
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue