From 40e88b27ef7f5abe82fdb204d0b5588b0c8a1602 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 22 Feb 2024 12:37:47 -0600 Subject: [PATCH] Mods --- main.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/main.py b/main.py index cc3f97f..2db7ae2 100644 --- a/main.py +++ b/main.py @@ -227,9 +227,7 @@ async def random_post(ws, room_id): # Select a random post post = posts[random_int(0, len(posts) - 1)] html = post.get("com", "") - - if not html: - return + if not html: return # Parse HTML using BeautifulSoup soup = BeautifulSoup(html, "html.parser") @@ -244,10 +242,6 @@ async def random_post(ws, room_id): # Get text content and limit to 500 characters text = soup.get_text(separator="\n")[:500].strip() - - if not text: - return - text = clean_lines(text) if text: