From 25798d6433b5c1e625c3a9f10855fd0e6bf1160e Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:56:51 +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 | 75 ++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/py/iptv流畅度检测.py b/py/iptv流畅度检测.py index 309d01a..26cb338 100644 --- a/py/iptv流畅度检测.py +++ b/py/iptv流畅度检测.py @@ -24,8 +24,11 @@ from translate import Translator # 导入Translator类,用于文本翻译 # 搜素关键词:"iptv/live/zh_cn.js" && country="CN" && region="Hunan" && city="changsha" # 搜素关键词:"ZHGXTV" && country="CN" && region="Hunan" && city="changsha" #"isShowLoginJs"智能KUTV管理 - -#定义ZHGXTV采集地址 +###################################################################################################################### +###################################################################################################################### +###########################################################ZHGX采集#################################################### +###################################################################################################################### +###################################################################################################################### urls = [ "https://fofa.info/result?qbase64=IlpIR1hUViIgJiYgcmVnaW9uPSJndWFuZ2Rvbmci",#广东 "https://fofa.info/result?qbase64=IlpIR1hUViIgJiYgY2l0eT0iY2hhbmdzaGEi", # changsha 长沙# @@ -275,6 +278,11 @@ for line in fileinput.input("iptv.txt", inplace=True): #打开文件,并对 line = line.replace("都市生活6", "都市") print(line, end="") #设置end="",避免输出多余的换行符 +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### #定义智慧桌面采集地址 urls = [ "https://fofa.info/result?qbase64=ImlwdHYvbGl2ZS96aF9jbi5qcyIgJiYgcG9ydD0iMTExMSI%3D", # 1111 @@ -523,7 +531,12 @@ print("频道列表文件iptv.txt追加写入成功!") -###################################################去除列表中的组播地址 +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################去除列表中的组播地址,酒店源验证整理 def filter_lines(input_file, output_file): with open(input_file, 'r', encoding='utf-8') as file: lines = file.readlines() @@ -536,10 +549,6 @@ def filter_lines(input_file, output_file): output_file.writelines(filtered_lines) filter_lines("iptv.txt", "iptv.txt") - - - - ###################################################打开文件,并对其进行行内关键词原地替换再次规范频道名,若无异类频道名,此段代码可删 for line in fileinput.input("iptv.txt", inplace=True): # line = line.replace("CHC电影", "影迷电影") @@ -939,38 +948,12 @@ print("任务运行完毕,酒店源频道列表可查看文件夹内txt文件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 获取rtp目录下的文件名 +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +# 获取rtp目录下的文件名,组播IP采集 files = os.listdir('rtp') files_name = [] @@ -1090,7 +1073,12 @@ for keyword in keywords: print('节目表制作完成! 文件输出在当前文件夹!') -# 合并自定义频道文件# +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +# 合并自定义频道文件,综合源整理 file_contents = [] file_paths = ["playlist/四川电信.txt", "playlist/河南电信.txt", "playlist/河北电信.txt"] # 替换为实际的文件路径列表 for file_path in file_paths: @@ -1473,7 +1461,12 @@ import os from opencc import OpenCC import fileinput -# 合并自定义频道文件# +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +###################################################################################################################### +# 合并自定义频道文件,优选源整理 file_contents = [] file_paths = ["playlist/天津联通.txt", "playlist/四川电信.txt", "playlist/河北电信.txt", "playlist/河南电信.txt", "酒店源.txt", "综合源.txt"] # 替换为实际的文件路径列表 for file_path in file_paths: