# -*- coding: utf-8 -*-
import sys, io, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
P = r"D:\work buddy\2026-11-05-14-15-52\index_main.html"
t = open(P, encoding="utf-8").read()
seg = t[t.index("const PROGRAMS=["):t.index("const CATD=[")]
blocks = re.split(r'(?=\{id:")', seg)[1:]
ids = ["emory-cs-ms", "rice-mcs-ms", "rice-mds-ms", "uchicago-stats", "notre-mscse", "dartmouth-cs-ms", "cmu-msis"]
def get(b, k):
    m = re.search(k + r':"((?:[^"\\]|\\.)*)"', b)
    return m.group(1) if m else ""
for b in blocks:
    i = get(b, "id")
    if i in ids:
        print("###", i)
        print(b[:700])
        print()
