From eb79b8bf80b46f88981968481de0b1b60c4a79a7 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Wed, 6 Jan 2016 16:02:54 +0100 Subject: [PATCH] catch unicode errors, returning nothing --- common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.py b/common.py index 86cb48e..f3876f0 100644 --- a/common.py +++ b/common.py @@ -144,6 +144,8 @@ def extract_title(url): (html_text, headers) = fetch_page(url) except URLError as e: return None + except UnicodeDecodeError: + return None except Exception as e: return 'failed: %s for %s' % (str(e), url)