]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/parse_html_beautifulsoup.py
Fixed a bug - parse "HTTP-Equiv" without content.
[bookmarks_db.git] / Robots / parse_html_beautifulsoup.py
index 47ecbaf459f367a9a80d535af1add172709dcf0d..fa5139f9e210be3dfb5d658f918689b329c0a220 100644 (file)
@@ -101,7 +101,11 @@ def parse_html(filename, charset=None, log=None):
    meta = head.find(_find_contenttype, recursive=False)
    if meta:
       try:
-         __charset = meta.get("content").lower().split('charset=')[1].split(';')[0]
+         meta_content = meta.get("content")
+         if meta_content:
+             __charset = meta_content.lower().split('charset=')[1].split(';')[0]
+         else:
+             meta_charset = False
       except IndexError: # No charset in the META Content-Type
          meta_charset = False
       else: