Update deepseek-iptv.py

This commit is contained in:
alantang 2025-03-25 00:19:29 +08:00 committed by GitHub
parent 79b11a8108
commit bd5d712eae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,