From: Oleg Broytman Date: Tue, 4 Jan 2011 19:34:49 +0000 (+0000) Subject: Report what parser is in use. X-Git-Tag: v4.5.3~57 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=796c00ff1e57833e90ebb154bbe94df8461db0a2;p=bookmarks_db.git Report what parser is in use. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@319 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/parse_html/__init__.py b/parse_html/__init__.py index 96fa696..ec8fcec 100644 --- a/parse_html/__init__.py +++ b/parse_html/__init__.py @@ -118,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: