# -*- coding: utf-8 -*-
import re, requests
UA = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36",
      "Accept": "text/html,application/xhtml+xml", "Accept-Language": "en-US,en;q=0.9"}
for u in ["https://www.sp2.upenn.edu/admissions/"]:
    r = requests.get(u, headers=UA, timeout=35)
    print(u, r.status_code)
    hrefs = sorted(set(re.findall(r'href="([^"]+)"', r.text)))
    for h in hrefs:
        if "sp2.upenn.edu" in h and any(k in h.lower() for k in ["mssp", "policy", "tuition", "fee", "apply", "international"]):
            print("L", h)
