diff options
| author | 2019-02-28 23:30:09 +0000 | |
|---|---|---|
| committer | 2019-02-28 23:30:09 +0000 | |
| commit | 4467ba8ab6ae487ee8d8f0e765f61f4f607df400 (patch) | |
| tree | c46798ea1dbe7e892dd2ad53a5c96397ac319929 /modules | |
| parent | Raise a specific exception in utils.http.request for "wrong content type" (diff) | |
| signature | ||
specifically handle HTTPWrongContentTypeException in title.py
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/title.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |
