From 404488890e9596226ca778460ecebff6de4fa685 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:37:05 +0800 Subject: [PATCH] Update iptv.py --- py/iptv.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/py/iptv.py b/py/iptv.py index 6893941..e04d193 100644 --- a/py/iptv.py +++ b/py/iptv.py @@ -535,7 +535,8 @@ def filter_lines(input_file, output_file): lines = file.readlines() filtered_lines = [] for line in lines: - if 'hls' in line or 'tsfile' in line: + #if 'hls' in line or 'tsfile' in line: + if '2223' in line: if 'udp' not in line and 'rtp' not in line and 'CCTV' not in line and '卫视' not in line: filtered_lines.append(line) with open(output_file, 'w', encoding='utf-8') as output_file: @@ -904,11 +905,11 @@ def check_and_write_file(input_file, output_file, keywords): else: print(f"文件已提取关键词并保存为: {output_file}") # 按类别提取关键词并写入文件 -#check_and_write_file('酒店源.txt', 'a0.txt', keywords="央视频道, 8K, 4K, 4k") -#check_and_write_file('酒店源.txt', 'a.txt', keywords="央视频道, CCTV, 8K, 4K, 爱上4K, 纯享, 风云剧场, 怀旧剧场, 影迷, 高清电影, 动作电影, 每日影院, 全球大片, 第一剧场, 家庭影院, 影迷电影, 星光, 华语, 美国大片, 峨眉") -#check_and_write_file('酒店源.txt', 'a1.txt', keywords="央视频道, 风云音乐, 女性时尚, 地理世界, 音乐现场") +check_and_write_file('酒店源.txt', 'a0.txt', keywords="央视频道, 8K, 4K, 4k") +check_and_write_file('酒店源.txt', 'a.txt', keywords="央视频道, CCTV, 8K, 4K, 爱上4K, 纯享, 风云剧场, 怀旧剧场, 影迷, 高清电影, 动作电影, 每日影院, 全球大片, 第一剧场, 家庭影院, 影迷电影, 星光, 华语, 美国大片, 峨眉") +check_and_write_file('酒店源.txt', 'a1.txt', keywords="央视频道, 风云音乐, 女性时尚, 地理世界, 音乐现场") -#check_and_write_file('酒店源.txt', 'b.txt', keywords="卫视频道, 卫视, 凤凰, 星空") +check_and_write_file('酒店源.txt', 'b.txt', keywords="卫视频道, 卫视, 凤凰, 星空") check_and_write_file('酒店源.txt', 'c.txt', keywords="影视频道, 爱情喜剧, 爱喜喜剧, 风云剧场, 怀旧剧场, 影迷, 高清电影, 动作电影, 每日影院, 全球大片, 第一剧场, 家庭影院, 影迷电影, 星光, 华语, 美国大片, 峨眉, \ 电影, 惊嫊悬疑, 东北热剧, 无名, 都市剧场, iHOT, 剧场, 欢笑剧场, 重温经典, 明星大片, 中国功夫, 军旅, 东北热剧, 中国功夫, 军旅剧场, 古装剧场, \