This commit is contained in:
Kovid Goyal 2014-05-23 08:45:02 +05:30
parent be37ccfb56
commit 3105d2bd32

View File

@ -36,7 +36,10 @@ def norm_title(title):
return normalize_entities(normalize_spaces(title))
def get_title(doc):
try:
title = doc.find('.//title').text
except AttributeError:
title = None
if not title:
return '[no-title]'