Skip to content

Commit 8b8bea6

Browse files
committed
Fix 'NavigableString' object has no attribute 'get'
1 parent 1347496 commit 8b8bea6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

html2notion/translate/html2json_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ def convert_table(self, soup):
469469
# Can't use this way like: background-image: url('data:image/png;base64...')
470470
@staticmethod
471471
def get_tag_style(tag_soup):
472-
style = tag_soup.get('style', "")
473472
styles = {}
473+
if not isinstance(tag_soup, Tag):
474+
return styles
475+
style = tag_soup.get('style', "")
474476
if str and isinstance(style, str):
475477
# style = ''.join(style.split())
476478
styles = {

0 commit comments

Comments
 (0)