# -*- coding: utf-8 -*-
import re, sys, io
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 = ["nyu-cs-courant-ms", "nyu-ds-ms", "nyu-infosys-ms", "cornell-cs-ms", "upenn-ee-mse", "ucsd-ms-stat-2027", "vandy-ds-ms"]
for b in blocks:
    m = re.match(r'{id:"([^"]+)"', b)
    if not m or m.group(1) not in ids:
        continue
    print("=================================")
    print(b[:1200])
