Update 网络收集.py

This commit is contained in:
frxz751113
2024-09-12 13:15:39 +08:00
committed by GitHub
parent a8cae655e8
commit da28fb19c1
+5
View File
@@ -107,6 +107,11 @@ simplified_text = converter.convert(traditional_text)
with open('汇总.txt', 'w', encoding='utf-8') as file: with open('汇总.txt', 'w', encoding='utf-8') as file:
file.write(simplified_text) file.write(simplified_text)
excluded_keywords = ['epg', 'mitv', 'udp', 'rtp', 'P2p', 'p2p', 'p3p', 'P2P', '新闻综合', 'P3p', '9930/qilu', 'shandong', 'goodiptv', '购物', '[', 'P3P', 'CCTV', '', '', '/pt', '//1', '/hls/', '春节']
with open('汇总.txt', 'r', encoding='utf-8') as infile, open('汇总.txt', 'w', encoding='utf-8') as outfile:
for line in infile:
if not any(keyword in line for keyword in excluded_keywords):
outfile.write(line)
with open('汇总.txt', 'r', encoding="utf-8") as file: with open('汇总.txt', 'r', encoding="utf-8") as file: