From 421c8883f6a1dc65ef8a62a5f7922d8c4882a2b7 Mon Sep 17 00:00:00 2001 From: iou1name Date: Thu, 12 Jul 2018 20:04:45 -0400 Subject: [PATCH] bugfix --- modules/tld.py | 2 +- modules/url.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tld.py b/modules/tld.py index c70ce36..418a51c 100755 --- a/modules/tld.py +++ b/modules/tld.py @@ -49,5 +49,5 @@ def gettld(bot, trigger): for n in range(len(table_headers)): msg += f"\x0310{table_headers[n]}\x03: " msg += f"\x0312{table_entries[n]}\x03 | " - msg = msg[:-3] + msg = msg[:-3].replace("\n","") bot.msg(msg) diff --git a/modules/url.py b/modules/url.py index 54d4650..d0127f3 100755 --- a/modules/url.py +++ b/modules/url.py @@ -37,7 +37,7 @@ def title_auto(bot, trigger): try: res = requests.get(url, headers=HEADERS, verify=True, timeout=10) except (requests.exceptions.ConnectionError, - requests.execeptions.ReadTimeout): + requests.exceptions.ReadTimeout): continue try: res.raise_for_status() @@ -52,6 +52,6 @@ def title_auto(bot, trigger): title = res.text[res.text.find("")+7:res.text.find("")] title = HTMLParser().unescape(title) title = title.replace("\n","").strip() - title = title.encode("latin-1").decode("utf-8") + #title = title.encode("windows_1252").decode("utf-8") hostname = urlparse(url).hostname bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}")