import re, json

html = open('index_main.html', encoding='utf-8').read()
ids = re.findall(r'id:"([^"]+)"', html)
print(f"Total IDs: {len(ids)}")

candidates = [
    'harvard-biomedical', 'harvard-bmi',
    'uw-cs', 'uw-stat', 'uw-waterloo',
    'ubc-stat', 'ubc-ece',
    'waterloo-cs', 'waterloo-stat',
    'toronto-ece', 'uoft-ece',
]
for c in candidates:
    matches = [i for i in ids if c in i]
    print(f"{c}: {len(matches)} -> {matches[:8]}")

# Also check by school: uw, ubc, uoft
print("\n--- All UW IDs ---")
uw_ids = [i for i in ids if i.startswith('uw-')]
print(f"Count: {len(uw_ids)}")
print(uw_ids)

print("\n--- All UBC IDs ---")
ubc_ids = [i for i in ids if i.startswith('ubc-')]
print(f"Count: {len(ubc_ids)}")
print(ubc_ids)

print("\n--- All UofT IDs ---")
ut_ids = [i for i in ids if i.startswith('ut-')]
print(f"Count: {len(ut_ids)}")
print(ut_ids)
