# -*- coding: utf-8 -*-
import io, sys, os, urllib.request, ssl, json
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
cands=[
 ("dartmouth-engineering-sciences-ms.html","http://engineering.dartmouth.edu/academics/graduate/ms/"),
 ("yale-personalized-medicine-applied-engineering.html","https://gsas.yale.edu/programs-of-study/personalized-medicine-applied-engineering"),
 ("notre-aerospace-engineering-msae---masters-traditional.html","https://graduateschool.nd.edu/degree-programs/aerospace-engineering-msae---masters-traditional/"),
 ("notre-civil-and-environmental-engineering-meng---masters-professional.html","https://graduateschool.nd.edu/degree-programs/civil-and-environmental-engineering-meng---masters-professional/"),
 ("notre-civil-engineering-msce---masters-traditional.html","https://graduateschool.nd.edu/degree-programs/civil-engineering-msce---masters-traditional/"),
 ("notre-interdisciplinary-mathematics-msim---masters-traditional.html","https://graduateschool.nd.edu/degree-programs/interdisciplinary-mathematics-msim---masters-traditional/"),
 ("jhu-ehe-ms.html","https://e-catalogue.jhu.edu/engineering/full-time-residential-programs/degree-programs/environmental-health-engineering/environmental-health-engineering-master-science/"),
]
out={}
for det,url in cands:
    try:
        req=urllib.request.Request(url,headers={"User-Agent":"Mozilla/5.0"})
        r=urllib.request.urlopen(req,timeout=8,context=ctx)
        b=r.read(); out[det]={"status":r.status,"bytes":len(b),"url":url}
        print(det, r.status, len(b),"B")
    except Exception as e:
        out[det]={"status":"ERR","err":str(e)[:80],"url":url}
        print(det,"ERR",str(e)[:80])
json.dump(out,open("_probe31c.json","w",encoding="utf-8"),ensure_ascii=False,indent=1)
