# -*- coding: utf-8 -*-
import io, sys, os, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
dets=["details/vanderbilt-www-datascience-msprogram.html","details/geo-data-science-analytics-ms.html","details/geo-health-informatics-data-science-ms.html","details/geo-biostatistics-ms.html","details/geo-data-science-for-public-policy-ms.html"]
for d in dets:
    t=open(d,encoding="utf-8").read()
    h1=re.search(r'<h1[^>]*>(.*?)</h1>',t,re.S)
    h2=re.findall(r'<h2>(.*?)</h2>',t)
    links=re.findall(r'href="(https?://[^"]+)"',t)
    print(f"{d}  h1={re.sub(r'<[^>]+>','',h1.group(1)).strip()[:18] if h1 else '?'}  h2={len(h2)}  外链={len(links)}")
