From a7bde7ea186805762164ceb96f27984c30e8b259 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 13 Aug 2010 13:03:06 +0000 Subject: [PATCH] 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 --- Robots/parse_html_etreetidy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.39.5