From 72e432c46c06434e33d72cbe49c1b17691ac729c Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 2 Jul 2018 12:43:13 -0400 Subject: [PATCH] added date to .bq and fixed encoding bug on url titles --- modules/bq.py | 3 ++- modules/url.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/bq.py b/modules/bq.py index 2b1eea5..08cc075 100755 --- a/modules/bq.py +++ b/modules/bq.py @@ -15,5 +15,6 @@ def BQstatus(bot, trigger): status = "\x0304DEAD" deathdate = "[2017-02-16 00:19:00]" msg = "Banished Quest status: " + status + "\nTime since death: " - msg += relativeTime(bot.config, datetime.now(), deathdate) + " ago" + msg += relativeTime(bot.config, datetime.now(), deathdate) + " ago " + msg += deathdate bot.msg(msg) diff --git a/modules/url.py b/modules/url.py index a26f95e..3951d7c 100755 --- a/modules/url.py +++ b/modules/url.py @@ -51,5 +51,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") hostname = urlparse(url).hostname bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}")