From: Oleg Broytman Date: Fri, 13 Aug 2010 13:03:06 +0000 (+0000) Subject: Lookup title in the root if not found in head. X-Git-Tag: v4.5.3~101 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=a7bde7ea186805762164ceb96f27984c30e8b259;p=bookmarks_db.git Lookup title in the root if not found in head. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@275 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/parse_html_etreetidy.py b/Robots/parse_html_etreetidy.py index 5f8bd86..7149c22 100644 --- a/Robots/parse_html_etreetidy.py +++ b/Robots/parse_html_etreetidy.py @@ -22,7 +22,9 @@ def parse_html(filename, charset=None, log=None): title = html_tree.findtext('head/title') if title is None: - return None + title = html_tree.findtext('title') + if title is None: + return None meta = html_tree.findall('head/meta') for m in meta: