# -*- coding: utf-8 -*-
import sys, io, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
BASE = r"D:\work buddy\2026-11-05-14-15-52"
FIX = [("申请截止、语言要求、标化、学费、课程设置等精确字段待系站恢复后补全，不臆造。",
        "学费已按 2026-27 研究生注册费官方页回填；申请截止、语言要求、标化、课程设置等字段待系站恢复后补全，不臆造。")]
for pid in ["ucsd-math-app-ms","ucsd-bioe-med-ms","ucsd-es-bb-ms","ucsd-es-pe-ms","ucsd-es-cm-ms"]:
    fp = os.path.join(BASE, "details", pid + ".html")
    t = open(fp, encoding="utf-8").read()
    ch = False
    for a, b in FIX:
        if a in t:
            t = t.replace(a, b); ch = True
    if ch:
        open(fp, "w", encoding="utf-8").write(t)
        print("note fixed", pid)
    else:
        print("note skip", pid)
