[webpages] Bail if we can't get text

This commit is contained in:
2025-03-07 14:33:02 -05:00
parent 42699f84d2
commit 760575e41d

View File

@ -141,6 +141,9 @@ class WebPage(ScrobblableMixin):
self.save(update_fields=["domain"])
def _update_title_from_web(self, raw_text: str, save=False):
if not raw_text:
return
self.title = raw_text[
raw_text.find("<title>") + 7 : raw_text.find("</title>")
]