# -*- coding: utf-8 -*-
import io, sys, os, json, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
b = r"D:\work buddy\2026-11-05-14-15-52"
rows = json.load(open(os.path.join(b,"pending_uchicago_phd_catd.json"),encoding="utf-8"))
dq=[r for r in rows if '"' in r[2] or '"' in r[1] or '"' in r[3]]
print("双引号:", len(dq))
sl=[r[7] for r in rows]; print("slug重复:", len(sl)-len(set(sl)))
# 链接检查
bad_url=[r[2] for r in rows if not str(r[5]).startswith("http")]
print("非http链接:", bad_url)
# 看 raw links 博士链接抽样
raw={d["title"]:d for d in json.load(open(os.path.join(b,"raw_uchicago.json"),encoding="utf-8"))}
for t in ["Accounting","Computer Science","Theology","Public Health"]:
    print(t, "->", raw[t]["links"])
