mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
fstrings for titleObs
This commit is contained in:
@@ -76,7 +76,7 @@ class TitleObserver(PrivMsgObserverPrototype):
|
|||||||
else:
|
else:
|
||||||
# with open("content.html", "w") as file:
|
# with open("content.html", "w") as file:
|
||||||
# file.write(content)
|
# 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 = html.unescape(title)
|
||||||
title = title.replace("\n", " ").replace("\r", "")
|
title = title.replace("\n", " ").replace("\r", "")
|
||||||
@@ -84,5 +84,5 @@ class TitleObserver(PrivMsgObserverPrototype):
|
|||||||
title = title.replace(">", ">")
|
title = title.replace(">", ">")
|
||||||
title = title.replace("&", "&")
|
title = title.replace("&", "&")
|
||||||
if title == "":
|
if title == "":
|
||||||
raise Exception("Empty Title for {}".format(url))
|
raise Exception(f"Empty Title for {url}")
|
||||||
return title
|
return title
|
||||||
|
|||||||
Reference in New Issue
Block a user