MCPcopy Create free account
hub / github.com/CCSH/IPTV / load_corrections

Function load_corrections

main.py:99–112  ·  view source on GitHub ↗
(corrections_path: str)

Source from the content-addressed store, hash-verified

97 return combined
98
99def load_corrections(corrections_path: str) -> dict:
100 corrections = {}
101 lines = read_txt(corrections_path)
102 for line in lines:
103 if not line or "," not in line:
104 continue
105 parts = line.split(',')
106 correct_name = parts[0].strip()
107 for wrong_name in parts[1:]:
108 wrong_name = wrong_name.strip()
109 if wrong_name:
110 corrections[wrong_name] = correct_name
111 print(f"[INFO] 加载频道纠错规则数: {len(corrections)}")
112 return corrections
113
114# ===================== 频道名称/URL处理 =====================
115def clean_channel_name(name: str) -> str:

Callers 1

main.pyFile · 0.85

Calls 1

read_txtFunction · 0.85

Tested by

no test coverage detected