# -*- coding: utf-8 -*-
import sys, io, re, pathlib
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
CACHE = pathlib.Path(r"D:\work buddy\2026-11-05-14-15-52\cache")
for k in ["gatech-analytics", "gatech-me", "gatech-bioinfo", "gatech-hci"]:
    raw = (CACHE / (k + ".html")).read_text(encoding="utf-8", errors="ignore")
    print("==", k, len(raw))
    print("  courselist:", raw.count("sc_courselist"), " codecol:", raw.count("codecol"))
    print("  has 'Program of':", "Program of" in raw, raw.find("Program of"))
    print("  tab ids:", re.findall(r'id="([a-z]+textcontainer)"', raw))
    print("  h4/h5:", re.findall(r"<(h4|h5)[^>]*>(.*?)</\1>", raw, re.S)[:8])
    i = raw.find("id=\"requirementstextcontainer\"")
    if i >= 0:
        print("  req head:", re.sub(r"<[^>]+>", " ", raw[i:i+300]).strip()[:250])
