# -*- coding: utf-8 -*-
import io,sys,ssl,urllib.request,urllib.error
sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding="utf-8")
ctx=ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE
urls={
"grad-adm":"https://gradadmissions.stanford.edu/",
"cs-adm":"https://cs.stanford.edu/admissions/graduate",
"cs-adm2":"https://cs.stanford.edu/academics/graduate/",
"gsd-adm":"https://gradadmissions.stanford.edu/apply/requirements",
"tuition":"https://studentaffairs.stanford.edu/rates-tuition",
"cs-ms":"https://cs.stanford.edu/academics/graduate/ms-computer-science",
}
for k,u in urls.items():
    try:
        req=urllib.request.Request(u,headers={"User-Agent":"Mozilla/5.0"})
        r=urllib.request.urlopen(req,timeout=15,context=ctx)
        b=r.read(); print(f"{k:10} {r.status} len={len(b)} {u}")
    except urllib.error.HTTPError as e:
        print(f"{k:10} HTTP {e.code} len=0 {u}")
    except Exception as e:
        print(f"{k:10} ERR {type(e).__name__}: {str(e)[:45]} {u}")
