# -*- coding: utf-8 -*-
import io, re, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
p = r"D:\work buddy\2026-11-05-14-15-52\index_main.html"
html = io.open(p, encoding="utf-8").read()
seg = html[html.index("const PROGRAMS=["):html.index("const CATD=[")]
blocks = [x for x in re.split(r'(?=\{id:")', seg) if x.lstrip().startswith('{id:"')]
for b in blocks:
    m = re.search(r'id:"([^"]+)"', b)
    if m and m.group(1) in sys.argv[1:]:
        print("=" * 8, m.group(1), len(b))
        print(b.strip()[:3000])
