# -*- coding: utf-8 -*-
import io, sys, os, json, urllib.request, ssl
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
todo=json.load(open("todo_upgrade.json",encoding="utf-8"))
ctx=ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE
for t in todo:
    if t["s"]=="vanderbilt" and "Economics (MA)" in t["en"]:
        print(t["en"],t["url"],t["det"])
        try:
            req=urllib.request.Request(t["url"],headers={"User-Agent":"Mozilla/5.0"})
            r=urllib.request.urlopen(req,timeout=15,context=ctx); print("  ",r.status,len(r.read()),"B")
        except Exception as e:
            print("  ERR",type(e).__name__,getattr(e,"code",""))
