From c42ed04ce18d2331375f0bb5301da013fb98fc70 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:30:13 +0800 Subject: [PATCH] Update iptv_udp.py --- py/iptv_udp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/iptv_udp.py b/py/iptv_udp.py index 63161cf..ec9e993 100644 --- a/py/iptv_udp.py +++ b/py/iptv_udp.py @@ -299,7 +299,7 @@ main() #################文本排序 # 打开原始文件读取内容,并写入新文件 -with open('IPTV_UDP', 'r', encoding='utf-8') as file: +with open('playlist/IPTV_UDP', 'r', encoding='utf-8') as file: lines = file.readlines() @@ -316,7 +316,7 @@ sorted_lines = sorted(lines, key=lambda x: (not 'CCTV' in x, extract_first_numbe output_file_path = "sorted_" + os.path.basename(file_path) # 写入新文件 -with open('IPTV_UDP', "w", encoding="utf-8") as file: +with open('playlist/IPTV_UDP', "w", encoding="utf-8") as file: for line in sorted_lines: file.write(line)