]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/parse_html_lxml.py
Removed old unused scripts and docs.
[bookmarks_db.git] / Robots / parse_html_lxml.py
index 7aba09cbf5d426e2edf21c96fc4ae3375cef36ac..8f658e1a026d9d16789f69bf43c5cf8a8d45fd83 100644 (file)
@@ -11,6 +11,9 @@ from parse_html_util import HTMLParser
 def parse_html(filename, charset=None, log=None):
     html_tree = parse(filename)
 
+    if html_tree.getroot() is None:
+        return None
+
     title = html_tree.findtext('head/title')
     if title is None:
         title = html_tree.findtext('title')