Compare commits
No commits in common. "3c55b0e9d12662a70ae5808828004899cd714558" and "7504a2d34225bc24cc452fde15e3264f4bef7157" have entirely different histories.
3c55b0e9d1
...
7504a2d342
|
@ -16,5 +16,4 @@ def BQstatus(bot, trigger):
|
|||
deathdate = "[2017-02-16 00:19:00]"
|
||||
msg = "Banished Quest status: " + status + "\nTime since death: "
|
||||
msg += relativeTime(bot.config, datetime.now(), deathdate) + " ago"
|
||||
msg += deathdate
|
||||
bot.msg(msg)
|
||||
|
|
|
@ -36,8 +36,7 @@ def title_auto(bot, trigger):
|
|||
continue
|
||||
try:
|
||||
res = requests.get(url, headers=HEADERS, verify=True, timeout=10)
|
||||
except (requests.exceptions.ConnectionError,
|
||||
requests.execeptions.ReadTimeout):
|
||||
except requests.exceptions.ConnectionError:
|
||||
continue
|
||||
try:
|
||||
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 = 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}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user