From d454f1d6aa7f2430d502d847693515f69489c66c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 3 Mar 2024 13:22:48 +0300 Subject: [PATCH] Feat(Robots/bkmk_robot_base): Process "data:image/" icons --- Robots/bkmk_robot_base.py | 6 ++++++ doc/ANNOUNCE | 6 ++++++ doc/ChangeLog | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index df33a26..e41b1a6 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -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 diff --git a/doc/ANNOUNCE b/doc/ANNOUNCE index a3340e6..b6e8e3e 100644 --- a/doc/ANNOUNCE +++ b/doc/ANNOUNCE @@ -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. diff --git a/doc/ChangeLog b/doc/ChangeLog index 4096a6f..a146682 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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. -- 2.39.5