# -*- coding: utf-8 -*-
import io, sys, os, urllib.request, ssl, re, html
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
ctx=ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE
hdr={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120 Safari/537.36"}
urls={
 "epmp":"https://epmp.rice.edu/",
 "engrprof":"https://engrprofmasters.rice.edu/programs",
 "cmor":"https://cmor.rice.edu/",
 "mech":"https://mech.rice.edu/",
 "bioe":"https://bioe.rice.edu/",
 "rcel":"https://www.rcelconnect.org/",
}
for k,u in urls.items():
    try:
        req=urllib.request.Request(u,headers=hdr)
        r=urllib.request.urlopen(req,context=ctx,timeout=15)
        b=r.read(); t=b.decode("utf-8","ignore")
        print(k,len(b),"B",r.status)
    except Exception as e:
        print(k,"ERR",type(e).__name__,str(e)[:50])
