From 73d956fc4322397624652d1a63341f3092988679 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 18 Jan 2016 23:05:12 +0100 Subject: [PATCH] Cancel page title reading on bad charset. --- plomlombot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plomlombot.py b/plomlombot.py index 0b605e9..8ac8f01 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -122,7 +122,8 @@ def lineparser_loop(io, nickname): continue charset = webpage.info().get_content_charset() if not charset: - charset = "utf-8" + notice("TROUBLE READING PAGE TITLE: no charset in header") + continue content_type = webpage.info().get_content_type() if content_type not in ('text/html', 'text/xml', 'application/xhtml+xml'): -- 2.30.2