# -*- coding: utf-8 -*-
import sys, io, os, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
idx = open("index_main.html", encoding="utf-8").read()
prog = idx[idx.find("const PROGRAMS="):idx.find("const CATD=")]
checks = [
 ("up-cbe", r"Chemical and Biomolecular Engineering|Chemical & Biomolecular Engineering"),
 ("up-mse-mat", r"Materials Science"),
 ("ut-mi", r"Master of Information\b"),
 ("ut-mbiotech", r"Master of Biotechnology|MBiotech"),
 ("ut-mscbmc", r"Biomedical Communications|MScBMC"),
]
for k,pat in checks:
    hits = re.findall(r'\{id:"([^"]+)"[^}]*?en:"([^"]*'+pat+r'[^"]*)"', prog, re.I)
    print(k, "hits:", hits[:5])
