Update iptv-cv2-check.py
This commit is contained in:
@@ -526,7 +526,8 @@ def filter_lines(input_file, output_file):
|
|||||||
lines = file.readlines()
|
lines = file.readlines()
|
||||||
filtered_lines = []
|
filtered_lines = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if ('hls' in line and 'm3u' in line) or ('tsfile' in line and 'm3u' in line): #行中包含m3u的同时还要包含hls或者tsfile
|
#if ('hls' in line and 'm3u' in line) or ('tsfile' in line and 'm3u' in line): #行中包含m3u的同时还要包含hls或者tsfile
|
||||||
|
if '凤凰' in line or '东森' in line or '天映' in line or '酒店' in line or '龙祥' in line or '美亚' in line or '好莱坞' in line: #仅提取港澳频道
|
||||||
if 'udp' not in line and 'rtp' not in line and 'CCTV' not in line and '卫视' not 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)
|
filtered_lines.append(line)
|
||||||
with open(output_file, 'w', encoding='utf-8') as output_file:
|
with open(output_file, 'w', encoding='utf-8') as output_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user