import json
with open("/root/gov_crawler/daily_crawl_config.json", "r") as f:
    cfg = json.load(f)
existing = [c for c in cfg["crawlers"] if c.get("name") == "太和区-通知公告"]
if not existing:
    cfg["crawlers"].append({
        "name": "太和区-通知公告",
        "script": "crawl_jzth.py",
        "incremental": True,
        "enabled": True,
        "sync_mode": "direct_server",
        "group": "辽宁",
        "note": "VSB9 CMS, 22页共530条, tzgg.htm + tzgg/N.htm, li>a[title], div.v_news_content正文"
    })
    with open("/root/gov_crawler/daily_crawl_config.json", "w") as f:
        json.dump(cfg, f, ensure_ascii=False, indent=2)
    print("OK: 太和区-通知公告 added")
else:
    print("SKIP: already exists")
