# -*- coding: utf-8 -*-
import re, io, sys, os, glob
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
b = r"D:\work buddy\2026-11-05-14-15-52"
t = open(os.path.join(b, "index_main.html"), encoding="utf-8").read()
seg = t.split("const PROGRAMS=[")[1].split("const CATD=")[0]
rows = re.findall(r'\{id:"([^"]+)",s:"wustl".*?n:"([^"]+)".*?url:"([^"]+)"', seg, re.S)
print("WashU 核验 PROGRAMS 条数:", len(rows))
for i, (_, n, u) in enumerate(rows, 1):
    print(f"{i:2d}. {n}  ->  {u}")

print("\n===== details 目录下 wustl 详情页文件（按修改时间）=====")
files = glob.glob(os.path.join(b, "details", "wustl-*.html"))
files.sort(key=lambda p: os.path.getmtime(p), reverse=True)
for p in files:
    mt = __import__("datetime").datetime.fromtimestamp(os.path.getmtime(p)).strftime("%m-%d %H:%M")
    print(f"{mt}  {os.path.basename(p)}")
print("\nwustl 详情页磁盘文件数:", len(files))
