# -*- coding: utf-8 -*-
import io, sys, os, ssl, urllib.request
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")

slugs = [
    "biosciences-ms",
    "international-affairs-ms",
    "global-development-ms",
    "mcrp",
    "march",
]
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

for s in slugs:
    url = f"https://catalog.gatech.edu/programs/{s}/"
    try:
        req = urllib.request.Request(url, headers={"User-Agent":"Mozilla/5.0"})
        r = urllib.request.urlopen(req, timeout=20, context=ctx)
        b = r.read()
        open(f"_52_{s}.html","wb").write(b)
        print(s, r.status, len(b))
    except Exception as e:
        print(s, "ERR", repr(e)[:120])
