tentatively fix #33

This commit is contained in:
Ploum 2023-12-10 22:54:37 +01:00
parent f9e33914aa
commit e3e81fe344
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@
- offpunk: Fix a crash when gus is called without parameters (Von Hohenheiden)
- ansicat: fixed a crash when parsing wrong hidden_url in gemini (bug #32)
- offpunk: offpunk --version doesnt create the cache anymore (bug #27)
- ansicat: fix a crash with HTML without title (bug #33)
## 2.0 - November 16th 2023
Changes since 1.10

View File

@ -1012,7 +1012,11 @@ class HtmlRenderer(AbstractRenderer):
except Exception as err:
pass
soup = BeautifulSoup(self.body,"html.parser")
self.title = str(soup.title.string)
if soup.title:
self.title = str(soup.title.string)
else:
self.title = ""
return self.title
else:
return ""