# -*- coding: utf-8 -*-
import io, sys, os, re, html
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")

raw = open("_44_nyu_wagner_index.html", encoding="utf-8").read()
# 提取所有 href 链接
links = re.findall(r'href="([^"]+)"[^>]*>([^<]{2,80})</a>', raw)
for href, text in links:
    t = text.strip()
    if "mpa" in t.lower() or "master" in t.lower() or "program" in t.lower() or "health" in t.lower() or "public" in t.lower():
        print(f"{t[:70]}  ->  {href}")
