This commit is contained in:
swee 2024-10-13 23:37:34 -07:00
parent cae57f1c14
commit 63b26cdb76

View file

@ -586,7 +586,7 @@ while True:
e = get(i, headers=headers, timeout=10) e = get(i, headers=headers, timeout=10)
if e.ok: if e.ok:
soup = BeautifulSoup(e.text, 'html.parser') soup = BeautifulSoup(e.text, 'html.parser')
multiline("(" + nick + ") " + soup.title.string if soup.title != None else "[No title provided]", channel) multiline("(" + nick + ") " + (soup.title.string if soup.title != None else "[No title provided]"), channel)
else: else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel) multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
except rex.SSLError as ex: except rex.SSLError as ex:
@ -597,7 +597,7 @@ while True:
e = get(i, headers=headers, timeout=10) e = get(i, headers=headers, timeout=10)
if e.ok: if e.ok:
soup = BeautifulSoup(e.text, 'html.parser') soup = BeautifulSoup(e.text, 'html.parser')
multiline("(" + nick + ") " + soup.title.string if soup.title != None else "[No title provided]", channel) multiline("(" + nick + ") " + (soup.title.string if soup.title != None else "[No title provided]"), channel)
else: else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel) multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
except: except: