# -*- coding: utf-8 -*-
import re, os, io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
BASE=os.path.dirname(os.path.abspath(__file__))
t=open(os.path.join(BASE,'index_main.html'),encoding='utf-8').read()
s=t[t.find('const PROGRAMS='):t.find('const CATD=')]
for c in s.split('{id:"')[1:]:
    c='{id:"'+c
    sid=re.search(r'\{id:"([^"]+)"',c).group(1)
    if sid in ('uw-mmsc','uw-meng-ece'):
        print(c[:600]); print('-----')
