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

# JHU AAP 首页找项目链接
txt=open("_43_jhu_aap.html",encoding="utf-8",errors="ignore").read()
links=re.findall(r'href="([^"]*(?:economics|financial|bioinformatics|gis|geographic|data-science|information-systems)[^"]*)"', txt, re.I)
print("AAP 项目链接:")
for l in sorted(set(links)):
    print(" ",l)

# 也找所有 /graduate/ 下的链接
links2=re.findall(r'href="(/advanced-academic-programs/graduate/[^"]*)"', txt)
print("\n所有 AAP graduate 链接:")
for l in sorted(set(links2))[:30]:
    print(" ",l)
