]> git.phdru.name Git - bookmarks_db.git/blobdiff - parse_html/__init__.py
Report what parser is in use.
[bookmarks_db.git] / parse_html / __init__.py
index 95ab357203fc8dadb0114c50ba55e63eaed2aef0..ec8fcec7d261b7703e3de8cab128b99de288c4b3 100644 (file)
@@ -10,6 +10,9 @@ __author__ = "Oleg Broytman <phd@phdru.name>"
 __copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design"
 __license__ = "GNU GPL"
 
+__all__ = ['parse_html']
+
+
 import codecs
 
 universal_charset = "utf-8"
@@ -115,8 +118,11 @@ def parse_html(filename, charset=None, log=None):
          if log: log("Parser %s.%s failed, trying next one." % (p.__module__, p.__name__))
 
    if not parser:
+       if log: log("All parser has failed.")
        return None
 
+   if log: log("Using %s.%s" % (p.__module__, p.__name__))
+
    converted_title = title = parser.title
    if title and (not parser.charset):
       try: