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