# -*- coding: utf-8 -*-
import io, sys, os, urllib.request, ssl, re, html
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
u="https://as.vanderbilt.edu/economics/about-ma-economics/"
req=urllib.request.Request(u,headers={"User-Agent":"Mozilla/5.0"})
t=urllib.request.urlopen(req,timeout=20,context=ctx).read().decode("utf-8","ignore")
for h in dict.fromkeys(re.findall(r'href="([^"]+)"',t)):
    if re.search(r'admiss|apply|require|tuition|curricul|course|deadline|financial|faq',h,re.I): print("LINK",h)
txt=html.unescape(re.sub(r"<script.*?</script>","",t,flags=re.S)); txt=re.sub(r"<style.*?</style>","",txt,flags=re.S); txt=re.sub(r"<[^>]+>"," ",txt); txt=re.sub(r"\s+"," ",txt)
open("_16_vandy-maecon.txt","w",encoding="utf-8").write(txt); print("chars",len(txt))
