diff --git a/modules/url.py b/modules/url.py index e96e674..11bbccc 100755 --- a/modules/url.py +++ b/modules/url.py @@ -3,8 +3,8 @@ URL parsing. """ import re +import html from urllib.parse import urlparse -from html.parser import HTMLParser import requests @@ -85,7 +85,7 @@ def title_auto(bot, trigger): if res.text.find("") == -1: continue title = res.text[res.text.find("<title>")+7:res.text.find("")] - title = HTMLParser().unescape(title) + title = html.unescape(title) title = title.replace("\n","").strip() hostname = urlparse(url).hostname bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}")