]> git.phdru.name Git - bookmarks_db.git/commitdiff
Lookup title in the root if not found in head.
authorOleg Broytman <phd@phdru.name>
Fri, 13 Aug 2010 13:03:06 +0000 (13:03 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 13 Aug 2010 13:03:06 +0000 (13:03 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@275 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/parse_html_etreetidy.py

index 5f8bd862bc5bd9e85197cf2950937ffb86b046e0..7149c2286332a55c3655bddda4632e26865279d7 100644 (file)
@@ -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: