Update 在线V4源优选.py

This commit is contained in:
frxz751113
2024-08-15 20:01:42 +08:00
committed by GitHub
parent 075d2c66be
commit 4146efaad3
+1 -1
View File
@@ -34,7 +34,7 @@ def filter_lines(input_file, output_file):
if ',' in line: #行中包含m3u的同时还要包含hls或者tsfile if ',' in line: #行中包含m3u的同时还要包含hls或者tsfile
if 'epg' not in line and 'mitv' not in line and 'udp' not in line and 'rtp' not in line and '[' not in line \ if 'epg' not in line and 'mitv' not in line and 'udp' not in line and 'rtp' not in line and '[' not in line \
and 'P2p' not in line and 'p2p' not in line and 'p3p' not in line and 'P2P' not in line and 'P3p' not in line and 'P3P' not in line: 排除组播地址 and 'P2p' not in line and 'p2p' not in line and 'p3p' not in line and 'P2P' not in line and 'P3p' not in line and 'P3P' 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:
output_file.writelines(filtered_lines) output_file.writelines(filtered_lines)
filter_lines("源.txt", "源.txt") filter_lines("源.txt", "源.txt")