# -*- coding: utf-8 -*-
import urllib.request, ssl, sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
SCTX = ssl.create_default_context(); SCTX.check_hostname=False; SCTX.verify_mode=ssl.CERT_NONE
urls = [
    ("USC_MMS", "https://www.marshall.usc.edu/programs/graduate-programs/posts/master-of-management-studies-mms"),
    ("USC_MNLM", "https://priceschool.usc.edu/academics/masters/master-of-nonprofit-leadership-and-management-mnlm/"),
    ("USC_IPPAM", "https://priceschool.usc.edu/academics/masters/master-of-international-public-policy-and-management-ippam/"),
    ("USC_DLA", "https://rossier.usc.edu/programs/masters/data-science-for-learning-applications/"),
    ("UCHI_BMI", "https://bmi.bsd.uchicago.edu/"),
    ("GTECH_BCFM", "https://catalog.gatech.edu/programs/building-construction-facility-management-ms/"),
]
for name, u in urls:
    try:
        req = urllib.request.Request(u, headers={"User-Agent":"Mozilla/5.0"})
        with urllib.request.urlopen(req, timeout=15, context=SCTX) as r:
            body = r.read()
            print(name, r.status, len(body), u)
    except Exception as e:
        print(name, "ERR", type(e).__name__, str(e)[:80], u)
