# -*- coding: utf-8 -*-
import re
h = open(r"D:\work buddy\2026-11-05-14-15-52\index_main.html", "r", encoding="utf-8").read()
m = re.search(r"const PROGRAMS\s*=\s*\[", h)
start = m.end()
depth = 1
i = start
while i < len(h) and depth > 0:
    if h[i] == "[": depth += 1
    elif h[i] == "]": depth -= 1
    i += 1
block = h[start:i-1]
entries = re.findall(r'\{id:"([^"]+)"', block)
for school in ["nyu", "brown", "emory", "geo", "wustl", "notre", "rice", "vanderbilt", "gatech", "ucsd", "uva", "unc", "mcg", "ubc"]:
    ids = sorted(set(e for e in entries if e.startswith(school + "-")))
    print(f"=== {school} ({len(ids)}) ===")
    for e in ids: print(" ", e)
    print()
