import json
cfg = json.load(open("/root/gov_crawler/daily_crawl_config.json", "r", encoding="utf-8"))
if isinstance(cfg, dict) and "crawlers" in cfg:
    crawlers = cfg["crawlers"]
else:
    crawlers = cfg

new_entry = {
    "script": "crawl_ynfushi_notice.py",
    "args": "--pages=5",
    "group": "企业",
    "industry": "环境公示",
    "name": "云南云天化福石-通知公告",
    "note": "ynfushi.com 通知公告(环评/环境公示), Yunsuo WAF"
}
crawlers.append(new_entry)
output = cfg if isinstance(cfg, dict) else crawlers
with open("/root/gov_crawler/daily_crawl_config.json", "w", encoding="utf-8") as f:
    json.dump(output, f, ensure_ascii=False, indent=2)
print("Added, total entries:", len(crawlers))
