# -*- coding: utf-8 -*-
import io, sys, re, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
BASE = r"D:\work buddy\2026-11-05-14-15-52"
f = os.path.join(BASE, "details", "duke-c529fb8.html")
t = open(f, encoding="utf-8").read()
print("bytes", len(t.encode("utf-8")))
print("h1", len(re.findall(r"<h1", t)), "h2", len(re.findall(r"<h2", t)))
kws = ["M.A. in Economics", "STEM", "30 学分", "15 学分", "January 14", "GRE General", "5156",
       "GMAT 不接受", "TOEFL", "IELTS", "Duolingo", "$95", "三封推荐信", "个人陈述", "简历",
       "补充问卷", "写作样本", "2 分钟", "40%", "221", "49", "ECON 601", "ECON 608",
       "Capstone", "Portfolio", "Durham", "limited tuition waivers", "RA", "TA", "微观", "计量"]
missing = [k for k in kws if k not in t]
print("missing:", missing if missing else "无，全部命中")
for ex in ["MSEC", "MAPE", "QFE", "PhD", "En Route", "part-time"]:
    print("排除口径含", ex, ":", ex in t)
print("未公布留空声明:", "留空" in t or "未做估算" in t)
