zs

Zeitungsschau rss to email converter
git clone git://r-36.net/zs
Log | Files | Refs | LICENSE

commit 4010b280ba3871965b852aad19c26f9331e861bd
parent 01445b45c7a7c31d732339989a71c957a633bad6
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sat, 10 Feb 2018 16:23:57 +0100

If the text is empty, do not throw exception.

Diffstat:
zeitungsschau/feedemail.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/zeitungsschau/feedemail.py b/zeitungsschau/feedemail.py @@ -17,6 +17,9 @@ import lxml.html import html2text def normalizeheader(hstr): + if len(hstr) == 0: + return "" + return lxml.html.fromstring(hstr).text_content().\ replace(u"\xa0", "").\ replace("\n", " ").strip()