import json

with open("/root/gov_crawler/daily_crawl_config.json") as f:
    cfg = json.load(f)

new_entry = {
    "name": "建峰集团-环境公示",
    "script": "crawl_cnjf_hjgs.py",
    "incremental": True,
    "sync_mode": "direct_server",
    "enabled": True,
    "group": "企业",
    "args": "--pages=5",
    "note": "建峰集团环境公示(classid=26)"
}

cfg["crawlers"].append(new_entry)
with open("/root/gov_crawler/daily_crawl_config.json", "w") as f:
    json.dump(cfg, f, ensure_ascii=False, indent=2)

print(f"已注册，配置总数: {len(cfg['crawlers'])}")
