From 0801a3413dd1a6ebf28ff13c54de8375e9e23db6 Mon Sep 17 00:00:00 2001 From: ramforth Date: Wed, 29 Oct 2025 13:03:22 +0100 Subject: [PATCH] Feat: Simplify initial message display and ensure tags are hidden. --- main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index cf2cc5d..89cafc4 100644 --- a/main.py +++ b/main.py @@ -87,17 +87,19 @@ def main(): console.print("[red]Could not find an active live chat for the given video ID.[/red]") return + console.print(f"[green]Found live chat ID: {live_chat_id}[/green]") + # Setup chat logging log_dir = "chat_logs" os.makedirs(log_dir, exist_ok=True) timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") log_filename = os.path.join(log_dir, f"chat_{video_id}_{timestamp}.log") log_file = open(log_filename, "w", encoding="utf-8") + console.print(f"[green]Chat will be logged to {log_filename}[/green]") - # Display initial messages using rich.Live for a few seconds - with Live(console=console, screen=True, refresh_per_second=4) as live: - live.update(Text(f"[green]Found live chat ID: {live_chat_id}[/green]\n[green]Chat will be logged to {log_filename}[/green]", justify="center")) - time.sleep(5) + # Wait for 5 seconds, then clear the screen again + time.sleep(5) + os.system('clear') next_page_token = None message_count = 0