From 6fcae7c8e196a4029ece9c01ac84fbc284a6ad86 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 5 Aug 2024 17:33:33 +0300 Subject: [PATCH] Feat(bkmk_robot_base) Cut long `data:` icon URLs for logs --- Robots/bkmk_robot_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index 85edfed..8b86940 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -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 -- 2.39.5