# 新华网 — 习近平活动报道集（leaders/xijinping/...）
#
# 站点状态（2026-04-28 实测）：
#   - 列表页静态渲染，单页 20 条；翻页是 JS 加 datasource→AJAX 拉 JSON，
#     httpx 走不通；增量抓 + dedup 早停下，单页 20 条对每日更新够用。
#   - 详情页正文也是静态渲染（span#detailContent 内是完整 <p>），
#     httpx 直抓即可，无需 playwright。
#   - title 在 <title>，末尾会带 "-新华网"，pipeline 已支持去尾。
#   - publish_time 在 <meta name="publishdate" content="YYYY-MM-DD">，
#     来源在 <meta name="source" content="...">。
#
# 增加同一报道集下的其它栏目（hyhd 会议活动、jjhj 接见会见、kcdy 考察
# 调研、tpbd 图片报道、jhqw 讲话全文、zywz 重要文章、zsps 指示批示、
# zdzx 致电致信、xxdb 学习读本…）只要新增 column 块用 alias_of: zxbd
# 继承选择器即可。

site_id: xinhua_xjp
site_name: 新华网·习近平报道集
base_url: https://www.news.cn
default_strategy: httpx
concurrency: 1
interval_sec: 5
enabled: true
respect_robots: true

default_column:
  list_selector:
    row: "ul.xpage-content-list > li"
    href: "div.tit a::attr(href)"
    title: "div.tit a::text"
    date: "div.time::text"
  pagination:
    type: none
  detail:
    # title 兜底已经在 detail_parser 走 <title>，这里给个 h1/title 的弱选择器即可
    title: "h1::text, title::text"
    publish_time: "meta[name='publishdate']::attr(content)"
    source: "meta[name='source']::attr(content)"
    content: "span#detailContent, div#detailContent"
    attachment_css: ""

columns:
  - column_id: zxbd
    name: 最新报道
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/zxbd.html
    list_selector:
      row: "ul.xpage-content-list > li"
      href: "div.tit a::attr(href)"
      title: "div.tit a::text"
      date: "div.time::text"
    pagination:
      type: none
    detail:
      title: "h1::text, title::text"
      publish_time: "meta[name='publishdate']::attr(content)"
      source: "meta[name='source']::attr(content)"
      content: "span#detailContent, div#detailContent"
      attachment_css: ""
    schedule: "0 7 * * *"   # 每天早 7 点
    enabled: true

  - column_id: hyhd
    name: 会议活动
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/hyhd.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: jjhj
    name: 接见会见
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/jjhj.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: kcdy
    name: 考察调研
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/kcdy.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: tpbd
    name: 图片报道
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/tpbd.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: jhqw
    name: 讲话全文
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/jhqw.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: zywz
    name: 重要文章
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/zywz.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: zsps
    name: 指示批示
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/zsps.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: zdzx
    name: 致电致信
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/zdzx.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true

  - column_id: xxdb
    name: 学习读本
    category: 时政
    list_url: https://www.news.cn/politics/leaders/xijinping/xxdb.htm
    alias_of: zxbd
    schedule: "0 7 * * *"
    enabled: true
