From: Oleg Broytman Date: Mon, 5 Aug 2024 14:33:33 +0000 (+0300) Subject: Feat(bkmk_robot_base) Cut long `data:` icon URLs for logs X-Git-Tag: 5.5.0~4 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6fcae7c8e196a4029ece9c01ac84fbc284a6ad86;p=bookmarks_db.git Feat(bkmk_robot_base) Cut long `data:` icon URLs for logs --- 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