Don't crash on self.title if no soup.head.title.

master
Ethan Dalool 2020-03-19 11:59:57 -07:00
parent 13d5534dc0
commit 93b6cb9f75
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ class Article:
css=writing_rootdir.with_child('css').with_child('dark.css').absolute_path,
return_soup=True,
)
if self.soup.head.title:
self.title = self.soup.head.title.get_text()
else:
self.title = self.md_file.basename
tag_links = self.soup.find_all('a', {'class': 'tag_link'})
for tag_link in tag_links: