From 2458f0e8dee5909c19c8f3c7f49adb50b3251894 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:39:09 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E6=B5=81=E7=95=85=E5=BA=A6=E6=A3=80?= =?UTF-8?q?=E6=B5=8B.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/流畅度检测.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/py/流畅度检测.py b/py/流畅度检测.py index f99a352..8228c9e 100644 --- a/py/流畅度检测.py +++ b/py/流畅度检测.py @@ -4,22 +4,9 @@ import os from opencc import OpenCC import fileinput -# 获取playlist目录下的文件名 -files1 = 'playlist' -# 过滤TXT文件 -file_contents = [] -for file_path in filter_files(files1, '.txt'): - with open('playlist/' + file_path, 'r', encoding="utf-8") as file: - content = file.read() - file_contents.append(content) -# 写入合并后的txt文件 -with open("playlist/3.txt", "w", encoding="utf-8") as output: - output.write('\n'.join(file_contents)) - - # 合并自定义频道文件# file_contents = [] -file_paths = ["playlist/3.txt", "酒店源.txt", "综合源.txt"] # 替换为实际的文件路径列表 +file_paths = ["playlist/天津联通.txt", "playlist/四川电信.txt", "playlist/河北电信.txt", "playlist/河南电信.txt", "酒店源.txt", "综合源.txt"] # 替换为实际的文件路径列表 for file_path in file_paths: if os.path.exists(file_path): with open(file_path, 'r', encoding="utf-8") as file: