From 4467ba8ab6ae487ee8d8f0e765f61f4f607df400 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 28 Feb 2019 23:30:09 +0000 Subject: specifically handle HTTPWrongContentTypeException in title.py --- modules/title.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/title.py') diff --git a/modules/title.py b/modules/title.py index c7e4f515..b3d2fd85 100644 --- a/modules/title.py +++ b/modules/title.py @@ -13,6 +13,8 @@ class Module(ModuleManager.BaseModule): except Exception as e: self.log.error("failed to get URL title", [], exc_info=True) return None + except utils.http.HTTPWrongContentTypeException: + return None if page.data.title: return page.data.title.text.replace("\n", " ").replace( "\r", "").replace(" ", " ").strip() -- cgit v1.3.1-10-gc9f91