import re
h = open('index_main.html', encoding='utf-8').read()
m = re.search(r'const PROGRAMS=(\[.*?\]);', h, re.DOTALL)
arr = m.group(1)
# split by {id:
items = re.findall(r'\{id:"([^"]+)"[^}]*?s:"([^"]+)"[^}]*?n:"([^"]+)"[^}]*?en:"([^"]+)"[^}]*?deg:"([^"]+)"', arr)
target = ('notre', 'ucsd', 'rice', 'uva', 'uchicago', 'cornell', 'col', 'jhu', 'duke', 'nyu', 'usc', 'umich', 'gatech')
for sid, s, n, en, deg in items:
    if s in target:
        print(f'{s:10s} {sid:42s} {deg:6s} {n} | {en}')
