]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat(bkmk_robot_base) Cut long `data:` icon URLs for logs
authorOleg Broytman <phd@phdru.name>
Mon, 5 Aug 2024 14:33:33 +0000 (17:33 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 5 Aug 2024 19:36:54 +0000 (22:36 +0300)
Robots/bkmk_robot_base.py

index 85edfed71c1562ec479926fb177262837e1e6096..8b8694056e7158e10b4ea467fb586125f153a34a 100644 (file)
@@ -186,8 +186,10 @@ class robot_base(Robot):
                             icon = None
                         if not icon:
                             icon = "/favicon.ico"
-                        icon_url = urljoin(bookmark.href, icon)
-                        self.log("   looking for icon at: %s" % icon_url)
+                        icon_url = icon_url_log = urljoin(bookmark.href, icon)
+                        if icon_url_log.startswith('data:'):
+                            icon_url_log = icon_url_log[:50] + '...'
+                        self.log("   looking for icon at: %s" % icon_url_log)
                         if icon_url in icons:
                             if icons[icon_url]:
                                 bookmark.icon_href = icon_url