# -*- coding: utf-8 -*-
import urllib.request, ssl, io, sys, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
SCTX = ssl.create_default_context(); SCTX.check_hostname=False; SCTX.verify_mode=ssl.CERT_NONE
UA = {"User-Agent":"Mozilla/5.0"}
cands = [
    ("Columbia bulletin", "https://bulletin.columbia.edu/"),
    ("Columbia GSAS", "https://bulletin.columbia.edu/graduate/arts-sciences/"),
    ("Columbia SEAS", "https://bulletin.columbia.edu/engineering/"),
    ("Columbia Business", "https://bulletin.columbia.edu/business/"),
    ("Columbia SIPA", "https://bulletin.columbia.edu/international-affairs/"),
    ("Columbia SSW", "https://bulletin.columbia.edu/social-work/"),
]
for name, url in cands:
    try:
        req = urllib.request.Request(url, headers=UA)
        r = urllib.request.urlopen(req, timeout=12, context=SCTX)
        body = r.read()
        print(f"OK  {r.status} {len(body):>7}B  {name}")
    except Exception as e:
        print(f"ERR {type(e).__name__:>20}  {name}")
