Compare commits

..

No commits in common. "3c55b0e9d12662a70ae5808828004899cd714558" and "7504a2d34225bc24cc452fde15e3264f4bef7157" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View File

@ -15,6 +15,5 @@ def BQstatus(bot, trigger):
status = "\x0304DEAD" status = "\x0304DEAD"
deathdate = "[2017-02-16 00:19:00]" deathdate = "[2017-02-16 00:19:00]"
msg = "Banished Quest status: " + status + "\nTime since death: " 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) bot.msg(msg)

View File

@ -36,8 +36,7 @@ def title_auto(bot, trigger):
continue continue
try: try:
res = requests.get(url, headers=HEADERS, verify=True, timeout=10) res = requests.get(url, headers=HEADERS, verify=True, timeout=10)
except (requests.exceptions.ConnectionError, except requests.exceptions.ConnectionError:
requests.execeptions.ReadTimeout):
continue continue
try: try:
res.raise_for_status() res.raise_for_status()
@ -52,6 +51,5 @@ def title_auto(bot, trigger):
title = res.text[res.text.find("<title>")+7:res.text.find("</title>")] title = res.text[res.text.find("<title>")+7:res.text.find("</title>")]
title = HTMLParser().unescape(title) title = HTMLParser().unescape(title)
title = title.replace("\n","").strip() title = title.replace("\n","").strip()
title = title.encode("latin-1").decode("utf-8")
hostname = urlparse(url).hostname hostname = urlparse(url).hostname
bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}") bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}")