X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rsimple.py;h=0dee51e8837ae3db9922704d78bd3e08b7325df7;hb=39c6f1c85c93c021fca528bb1a5cca91f53c196c;hp=32083ee95b254e264f367b5becb18a8f26d91d78;hpb=b84b118da97dd81ad1f3872b1fb62fe432c6a663;p=bookmarks_db.git diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 32083ee..0dee51e 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -157,14 +157,14 @@ class robot_simple(Robot): try: content_type = headers["Content-Type"] try: - content_type, charset = content_type.split(';') + content_type, charset = content_type.split(';', 1) content_type = content_type.strip() charset = charset.split('=')[1].strip() self.log(" HTTP charset : %s" % charset) except (ValueError, IndexError): charset = None self.log(" no charset in Content-Type header") - if content_type == "text/html": + if content_type in ("text/html", "application/xhtml+xml"): parser = parse_html(fname, charset, self.log) bookmark.real_title = parser.title if parser.refresh: