# -*- coding: utf-8 -*-
import urllib.request, ssl, sys, io, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
SCTX = ssl.create_default_context()
SCTX.check_hostname = False
SCTX.verify_mode = ssl.CERT_NONE
url = "https://catalog.upenn.edu/graduate/programs/city-and-regional-planning-mcp/"
req = urllib.request.Request(url, headers={
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
    "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "Accept-Language":"en-US,en;q=0.9",
    "Referer":"https://catalog.upenn.edu/graduate/programs/",
})
try:
    with urllib.request.urlopen(req, context=SCTX, timeout=25) as r:
        body = r.read()
        print("city-and-regional-planning-mcp", r.status, len(body))
except Exception as e:
    print("ERR", repr(e)[:120])
