1
0
Fork 0
forked from swee/MeowNex

Prepare for contribution #1

Merged
10kilo merged 30 commits from swee/MeowNex:main into main 2024-12-13 12:59:40 -08:00
Showing only changes of commit 0fc91a8aab - Show all commits

View file

@ -658,7 +658,7 @@ while True:
if content_type in allowedparse: if content_type in allowedparse:
if e.ok: if e.ok:
soup = BeautifulSoup(e.text, 'html.parser') 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: else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel) multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
else: else:
@ -676,7 +676,7 @@ while True:
if content_type in allowedparse: if content_type in allowedparse:
if e.ok: if e.ok:
soup = BeautifulSoup(e.text, 'html.parser') 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: else:
multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel) multiline("(" + nick + ") [HTTP " + str(e.status_code) + "]", channel)
else: else: