From f6c7680eb82ae0db48ce4c17a9b259e159ef8bd8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 20 Nov 2023 04:02:30 +0300 Subject: [PATCH] Fix(Py3): Remove forgotten `.decode()`/`.encode()` --- Writers/bkmk_whtml.py | 4 ++-- parse_html/bkmk_ph_beautifulsoup4.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Writers/bkmk_whtml.py b/Writers/bkmk_whtml.py index 09d9989..06fb9cf 100644 --- a/Writers/bkmk_whtml.py +++ b/Writers/bkmk_whtml.py @@ -57,8 +57,8 @@ class writer_html(Writer): if b.keyword: self.outfile.write(' SHORTCUTURL="%s"' % b.keyword) if b.icon_href: value = b.icon_href - if isinstance(value, unicode): - value = value.encode('utf-8') + #if isinstance(value, unicode): + # value = value.encode('utf-8') self.outfile.write(' ICON_URI="%s"' % value) if b.icon: self.outfile.write(' ICON="%s"' % b.icon) if b.charset: self.outfile.write(' LAST_CHARSET="%s"' % b.charset) diff --git a/parse_html/bkmk_ph_beautifulsoup4.py b/parse_html/bkmk_ph_beautifulsoup4.py index faafca2..d76c05a 100644 --- a/parse_html/bkmk_ph_beautifulsoup4.py +++ b/parse_html/bkmk_ph_beautifulsoup4.py @@ -69,8 +69,8 @@ def parse_html(html_text, charset=None, log=None): else: parts = [] for part in title: - if not isinstance(part, string_type): - part = part.decode() + #if not isinstance(part, string_type): + # part = part.decode() parts.append(part.strip()) title = ''.join(parts) -- 2.39.5