import re
h=open('index_main.html',encoding='utf-8').read()
m=re.search(r'const PROGRAMS=(\[[\s\S]*?\]);\s*\n',h)
body=m.group(1)
# split by {id:"..."}
items=re.findall(r'\{id:"([^"]+)",\s*s:"([^"]+)",\s*n:"([^"]*)",\s*en:"([^"]*)"',body)
print('total:',len(items))
for sid in ['umich','duke','geo','cmu','col','nu','cornell']:
    print(f'\n=== {sid} ===')
    for i in items:
        if i[1]==sid:
            print(' ',i[3][:95])
