# -*- 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
def get(u,fn):
    try:
        req=urllib.request.Request(u,headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64)"})
        b=urllib.request.urlopen(req,timeout=15,context=ctx).read()
        open(fn,"wb").write(b); return len(b)
    except Exception as e:
        return "ERR "+type(e).__name__+" "+str(e)[:60]
print("grad",get("https://computing.vanderbilt.edu/graduate-programs/","_19_computing_grad.txt"))
for path in ["mscs","computer-science-ms","ms-cs","mscs","graduate-admissions","apply"]:
    u="https://computing.vanderbilt.edu/"+path+"/"
    print(path, get(u,"_19_cs_"+path+".txt") if not path in ("apply",) else "")
