import re, os
base = os.path.dirname(os.path.abspath(__file__))
html = open(os.path.join(base, "index_main.html"), encoding="utf-8").read()
catd = re.search(r"const CATD\s*=\s*\[(.*?)\];", html, re.S).group(1)

for url in ["details/ut-mscsm.html", "details/usc-me-em-dual.html",
            "details/ut-c7a2833.html", "details/usc-me-emgmt-dual-ms.html",
            "details/uva-ms-systems-engineering.html", "details/uva-se-ms.html"]:
    n_prog = len(re.findall(r'url:"' + re.escape(url) + r'"', html))
    in_catd = url in catd
    in_vd = url in re.search(r"const VERIFIED_DETAILS[^;]+;", html).group(0)
    print(f"{url} | PROGRAMS引用={n_prog} | CATD={in_catd} | VD={in_vd}")
