From bd5d712eaeb32714342aedeb40dd715cc1f6ebc7 Mon Sep 17 00:00:00 2001 From: alantang <107459091+alantang1977@users.noreply.github.com> Date: Tue, 25 Mar 2025 00:19:29 +0800 Subject: [PATCH] Update deepseek-iptv.py --- deepseek-iptv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deepseek-iptv.py b/deepseek-iptv.py index 212d9bf9..97098665 100644 --- a/deepseek-iptv.py +++ b/deepseek-iptv.py @@ -56,7 +56,11 @@ def parse_m3u(content): current_program = None for line in content.splitlines(): if line.startswith("#EXTINF"): - current_program = re.search(r'tvg-name="([^"]+)"', line).group(1).strip() + match = re.search(r'tvg-name="([^"]+)"', line) + if match: + current_program = match.group(1).strip() + else: + current_program = None elif line.startswith("http") and current_program: streams.append({ "program_name": current_program,