X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fparse_html_html5.py;h=43e8d74ba957f658ffef276cadb2782ac27e84e5;hb=52092194ea42dcece57ed93c2a2875cd2907564e;hp=23020515aca8532d84ddbe3088f2d09f638c3c37;hpb=f8c96fe94544f486e9e76640d16fc355daa4db70;p=bookmarks_db.git diff --git a/Robots/parse_html_html5.py b/Robots/parse_html_html5.py index 2302051..43e8d74 100644 --- a/Robots/parse_html_html5.py +++ b/Robots/parse_html_html5.py @@ -83,4 +83,16 @@ def parse_html(filename, charset=None, log=None): icon = node.attributes['href'] break + else: + for node in html.childNodes: + if node.name == 'title': + if node.childNodes: + title = node.childNodes[0].value + break + else: + title = '' + + if title is None: + return None + return HTMLParser(charset, meta_charset, title, refresh, icon)