# -*- coding: utf-8 -*-
import io, re, json
P = r"D:\work buddy\2026-11-05-14-15-52\index_main.html"
html = io.open(P, encoding="utf-8").read()
seg = html[html.index("const PROGRAMS=["):html.index("const CATD=[")]
blocks = seg.split('{id:"')[1:]
for b in blocks:
    rid = b.split('"', 1)[0]
    m = re.search(r'(?<![A-Za-z])s:"([^"]*)"', b)
    if m and m.group(1) in ("upenn", "columbia", "carnegie", "university"):
        print("=" * 70)
        print(b[:900].rstrip())
