# -*- coding: utf-8 -*-
import re, sys, io, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
idx = open("index_main.html", encoding="utf-8").read()
catd = idx[idx.find("const CATD="):idx.find("const VERIFIED_DETAILS=")]
progs = idx[idx.find("const PROGRAMS="):idx.find("const CATD=")]
# 找 UT 教育相关 CATD
for m in re.finditer(r'\["ut",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)"\]', catd):
    college, en, cn, deg, url, disc, det = m.groups()
    if any(k in (en+cn).lower() for k in ["education","adult","higher","counselling","curriculum","language","social justice","oise","child study","teaching"]):
        in_prog = det in progs
        print(f"[{'已录' if in_prog else '占位'}] {cn} | {en} | {deg} | {det}")
