import requests, re
H = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36"}
for u in ["https://www.med.upenn.edu/mpp/msmp.html", "https://www.med.upenn.edu/mpp/"]:
    try:
        r = requests.get(u, headers=H, timeout=25)
        hrefs = re.findall(r'href="([^"]+)"', r.text)
        seen = set()
        for h in hrefs:
            if any(k in h.lower() for k in ["tuition", "admission", "apply", "financ"]):
                if h not in seen:
                    seen.add(h)
                    print(h)
        print("----", u, r.status_code)
    except Exception as e:
        print("ERR", u, type(e).__name__)
