diff --git a/src/css_reader.py b/src/css_reader.py index 11ecffa..bdab913 100644 --- a/src/css_reader.py +++ b/src/css_reader.py @@ -206,7 +206,6 @@ def add_inline_style_to_html_soup(soup1, css_text): tag_will_be_saved = parent_tag.name in tag_with_bg has_bg = parent_tag.attrs.get('style') and ('background' in parent_tag.attrs.get('style')) if has_bg and tag_will_be_saved: - print(tag, parent_tag.attrs.get('style'), parent_tag.name) return style_ children = tag.find_all() diff --git a/src/util/color_reader.py b/src/util/color_reader.py index a5c33ff..4ae5941 100644 --- a/src/util/color_reader.py +++ b/src/util/color_reader.py @@ -87,7 +87,7 @@ def rgba2rgb(r, g, b, alpha): def str2hex(s: str): - if '#' in s: + if '#' in s and (len(s) <= 7): return s.lower() if ('rgb' in s) and ('%' in s):