import io,re,json
h=io.open('index_main.html',encoding='utf-8').read()
seg=h[h.index('const PROGRAMS=['):h.index('const CATD=[')]
ids=["notre-mscse","notre-cse-phd","notre-msee","notre-ee-phd","notre-msme","notre-ame-phd","notre-acms-ms","notre-biosci-phd"]
for pid in ids:
    i=seg.find('{id:"'+pid+'"'); j=seg.find('},',i)
    blk=seg[i:j+1]
    print("="*15,pid)
    for k in ["ddl","lang","tui","test"]:
        m=re.search(r'(?<![A-Za-z])'+k+r':(\{cls:"(?:[^"\\]|\\.)*"\}|"(?:[^"\\]|\\.)*")',blk)
        print(" ",k,"=",m.group(1)[:220] if m else None)
