# -*- coding: utf-8 -*-
import re, io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
h = open('index_main.html', encoding='utf-8').read()
p0 = h.index("const PROGRAMS=["); p1 = h.index("const CATD=[")
seg = h[p0:p1]
lvls = re.findall(r'lvl:"([^"]*)"', seg)
m = lvls.count('m'); p = lvls.count('p')
print('总:', len(lvls), '硕(m):', m, '博(p):', p)
