X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rsimple.py;h=ba302943d175dd5e969adcf82cf564e0f2cb644b;hb=1d46a18bfe213e25401908cc3c31c5ac66008572;hp=42975d29a729d26ad4838cd64791acef0ca34d9a;hpb=98181607fade83338c1e633e18713f7544425ff3;p=bookmarks_db.git diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 42975d2..ba30294 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -202,6 +202,7 @@ class robot_simple(Robot): self.log(" looking for icon at: %s" % icon) if icon in icons: if icons[icon]: + bookmark.icon_href = icon content_type, bookmark.icon = icons[icon] self.log(" cached icon: %s" % content_type) else: @@ -230,9 +231,10 @@ class robot_simple(Robot): content_type = headers["Content-Type"] if content_type.startswith("image/"): icon_file = open(fname, "rb") - icon = icon_file.read() + icon_data = icon_file.read() icon_file.close() - bookmark.icon = "data:%s;base64,%s" % (content_type, b64encode(icon)) + bookmark.icon_href = icon + bookmark.icon = "data:%s;base64,%s" % (content_type, b64encode(icon_data)) self.log(" got icon : %s" % content_type) icons[icon] = (content_type, bookmark.icon) else: