]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat(Robots/bkmk_robot_base): Process "data:image/" icons
authorOleg Broytman <phd@phdru.name>
Sun, 3 Mar 2024 10:22:48 +0000 (13:22 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 3 Mar 2024 10:26:35 +0000 (13:26 +0300)
Robots/bkmk_robot_base.py
doc/ANNOUNCE
doc/ChangeLog

index df33a26bd43162d92252e04df933bcb378abaffe..e41b1a660574631354f77b44340a40efea7f285e 100644 (file)
@@ -182,6 +182,12 @@ class robot_base(Robot):
                                 self.log("   cached icon: %s" % content_type)
                             else:
                                 self.log("   cached icon: no icon")
+                        elif icon_url.startswith('data:'):
+                            content_type, icon_data = \
+                                icon_url[len('data:'):].split(',', 1)
+                            bookmark.icon_href = bookmark.icon = icon_url
+                            self.log("   got data icon  : %s" % content_type)
+                            icons[icon_url] = (content_type, icon_url)
                         else:
                             try:
                                 _icon_url = icon_url
index a3340e686db59f9c2d2ed43caf2e8443a2616f9e..b6e8e3e1ee01e57d543f76b21988b71b8ebf40b7 100644 (file)
@@ -6,6 +6,12 @@ WHAT IS IT
 bookmarks.html.
 
 WHAT'S NEW
+Version 5.2.2 (2024-03-03)
+
+   Robots/bkmk_rrequests: Add request headers.
+
+   Robots/bkmk_robot_base: Process "data:image/" icons.
+
 Version 5.2.1 (2024-03-02)
 
    Speedup second access through proxy.
index 4096a6f6ec9a67afccfe7ce2c3f6be77229d3f85..a14668202a2c09b703542bec4e84994e5b5f763d 100644 (file)
@@ -2,6 +2,8 @@ Version 5.2.2 (2024-03-03)
 
    Robots/bkmk_rrequests: Add request headers.
 
+   Robots/bkmk_robot_base: Process "data:image/" icons.
+
 Version 5.2.1 (2024-03-02)
 
    Speedup second access through proxy.