Skip to content

Commit edc03f5

Browse files
committed
fix: title, name site metadata not converted to string
1 parent ed72dca commit edc03f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mkdocs_link_embeds_plugin/fetchurl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_title( self, soup, title ):
5656
if soup.findAll( "meta", property="og:title" ):
5757
return soup.find( "meta", property="og:title")["content"]
5858
elif soup.findAll( 'title' ):
59-
return soup.find(' title' )
59+
return soup.find( 'title' ).string
6060
else:
6161
return title
6262

@@ -80,7 +80,7 @@ def get_site_name( self, soup, name ):
8080
if soup.findAll( "meta", property="og:site_name" ):
8181
return soup.find( "meta", property="og:site_name")["content"]
8282
elif soup.findAll( 'title' ):
83-
return soup.find(' title' )
83+
return soup.find( 'title' ).string
8484
else:
8585
return name
8686

0 commit comments

Comments
 (0)