zs

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

commit eb1dfe87f3b96659a24e5c1c91b4623260ff24b0
parent 86b129e4386789f5331765d7b96098e6c2c7bde7
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 17 May 2018 18:45:17 +0200

Do not bail on wrong html encoding.

Diffstat:
zeitungsschau/feedemail.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/zeitungsschau/feedemail.py b/zeitungsschau/feedemail.py @@ -50,7 +50,10 @@ def send(feed, to, smtphost="localhost", smtpport=None, ssl="False",\ h2t.inline_links = 0 h2t.links_each_paragraph = 0 - text = "%s\n" % (h2t.handle(article["text"])) + try: + text = "%s\n" % (h2t.handle(article["text"])) + except: + text = article["text"] del h2t else: