]> git.phdru.name Git - bookmarks_db.git/blobdiff - bkmk_parser.py
Store icon and charset in bookmark's attributes.
[bookmarks_db.git] / bkmk_parser.py
old mode 100755 (executable)
new mode 100644 (file)
index 02cce68..41df9ef
@@ -138,6 +138,8 @@ class BkmkParser(HTMLParser):
       last_visit = None
       last_modified = None
       keyword = None
+      icon = None
+      charset = None
 
       for attrname, value in attrs:
          value = value.strip()
@@ -151,9 +153,14 @@ class BkmkParser(HTMLParser):
             last_modified = value
          elif attrname == "shortcuturl":
             keyword = value
+         elif attrname == "icon":
+            icon = value
+         elif attrname == "last_charset":
+            charset = value
 
       debug("Bookmark points to: `%s'" % href)
-      bookmark = Bookmark(href, add_date, last_visit, last_modified, keyword or '')
+      bookmark = Bookmark(href, add_date, last_visit, last_modified,
+         keyword or '', '', icon, charset)
       self.current_object = bookmark
       self.current_folder.append(bookmark)
       self.urls += 1