fstrings for titleObs

This commit is contained in:
Context 77
2024-08-03 01:46:23 +02:00
parent ea1dbc47e3
commit e2d8e05ab5

View File

@@ -76,7 +76,7 @@ class TitleObserver(PrivMsgObserverPrototype):
else:
# with open("content.html", "w") as file:
# file.write(content)
raise Exception("Could not Parse Title for {}".format(url))
raise Exception(f"Could not Parse Title for {url}")
title = html.unescape(title)
title = title.replace("\n", " ").replace("\r", "")
@@ -84,5 +84,5 @@ class TitleObserver(PrivMsgObserverPrototype):
title = title.replace(">", ">")
title = title.replace("&", "&")
if title == "":
raise Exception("Empty Title for {}".format(url))
raise Exception(f"Empty Title for {url}")
return title