From d4e3a0653dc172e38a785b9153cd39d384bbc4d2 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Sat, 17 Aug 2024 21:03:22 +0800 Subject: [PATCH] =?UTF-8?q?Update=20iptv=E6=B5=81=E7=95=85=E5=BA=A6?= =?UTF-8?q?=E6=A3=80=E6=B5=8B.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/iptv流畅度检测.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/py/iptv流畅度检测.py b/py/iptv流畅度检测.py index afa7075..121d6a6 100644 --- a/py/iptv流畅度检测.py +++ b/py/iptv流畅度检测.py @@ -1494,22 +1494,17 @@ import fileinput ###################################################################################################################### ###################################################################################################################### # 合并自定义频道文件,优选源整理 -import os - # 假设filter_files是一个自定义函数,它返回playlist目录下所有.txt文件的路径列表 def filter_files(directory, extension): return [f for f in os.listdir(directory) if f.endswith(extension)] - # 获取playlist目录下的所有.txt文件 files = filter_files('playlist', '.txt') - # 打开输出文件 with open("4.txt", "w", encoding="utf-8") as output: for file_path in files: with open(os.path.join('playlist', file_path), 'r', encoding="utf-8") as file: content = file.read() output.write(content + '\n\n') - print("电视频道成功写入") #################文本排序