From 0fc91a8aab1147ce6337fd4d45bdcb1fac31fab7 Mon Sep 17 00:00:00 2001 From: Nova Cat Date: Sun, 8 Dec 2024 10:53:39 -0800 Subject: [PATCH] again --- sweebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sweebot.py b/sweebot.py index 3a91928..0f6413c 100644 --- a/sweebot.py +++ b/sweebot.py @@ -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: