From 3365aac6af47f55dd7d178a062a53ceb44314423 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 29 Feb 2024 13:30:09 -0600 Subject: [PATCH] Mods --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 97ec30d..f9f4530 100644 --- a/main.py +++ b/main.py @@ -205,7 +205,7 @@ async def on_message(ws, message): try: data = json.loads(message) - except: + except BaseException: return if data["type"] == "message": @@ -418,8 +418,8 @@ async def random_post(ws, room_id): for br in soup.find_all("br"): br.replace_with("\n") - # Get text content and limit to 500 characters - text = soup.get_text(separator="\n")[:500].strip() + # Get the text content + text = soup.get_text(separator="\n").strip() text = clean_lines(text) if not text: