1
0
Fork 0
forked from swee/MeowNex
This commit is contained in:
Nova Cat 2024-12-08 10:53:39 -08:00
parent b7f777bd0a
commit 0fc91a8aab

View file

@ -658,7 +658,7 @@ while True:
if content_type in allowedparse:
if e.ok:
soup = BeautifulSoup(e.text, 'html.parser')
multiline("(" + nick + ") " + (soup.title.string.rstrip()[:100] if soup.title != None else "[No title provided]"), channel)
multiline("(" + nick + ") " + (" ".join(soup.title.string.splitlines())[:100] if soup.title != None else "[No title provided]"), channel)
else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
else:
@ -676,7 +676,7 @@ while True:
if content_type in allowedparse:
if e.ok:
soup = BeautifulSoup(e.text, 'html.parser')
multiline("(" + nick + ") " + (soup.title.string.rstrip()[:100] if soup.title != None else "[No title provided]"), channel)
multiline("(" + nick + ") " + (" ".join(soup.title.string.splitlines())[:100] if soup.title != None else "[No title provided]"), channel)
else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
else: