# 清城区·政务（信息）公开
# https://www.qingcheng.gov.cn/xxgk/  (清远 NF-CMS 集群下 xxgk 路径变体)
#
# 注：清城区政府主站还有走清远云 gkmlpt API 的部分（site_code=qingcheng,
# cms_adapter=gkmlpt）。本 yaml 只覆盖 xxgk 这套传统 HTML 列表页。
#
# DOM 结构（2026-04-27 实测）：
#   列表: <ul class="list3"><li><a href title="…">…</a><span>YYYY-MM-DD</span></li> × N</ul>
#   详情: <h1>标题</h1>  <div class="info|article-info|author">时间…来源…</div>
#         <div class="article-content|content|TRS_Editor">正文…</div>
#
# 设计：用 default_column 兜底任意 column_id，从 admin UI discover-html +
# bulk-create-yaml 加任意新栏目都不用改本 yaml。

site_id: qingcheng_xxgk
site_name: 清城区·政务公开
base_url: http://www.qingcheng.gov.cn
default_strategy: httpx
concurrency: 1
interval_sec: 10
enabled: true
respect_robots: true

default_column:
  list_selector:
    row: "ul.list3 li, div.pageList li, .newsList li"
    href: "a::attr(href)"
    title: "a::attr(title), a::text"
    date: "span::text"
  pagination:
    type: path_pattern
    pattern: "index_{page}.html"
    start: 2
    max_pages: 30
  detail:
    title: >-
      h1.article-title::text, h1.title::text, h1::text,
      div.article-title::text, div.title::text
    publish_time: >-
      div.info span::text, span.date::text, span.time::text,
      div.author e::text, div.author::text, em.time::text
    source: >-
      span.source::text, div.info em::text, div.author::text
    content: >-
      div.article-content, div.content, div.TRS_Editor,
      div.xl-content, div#zoomcon, div.article
    attachment_css: >-
      a[href$='.pdf'], a[href$='.doc'], a[href$='.docx'],
      a[href$='.xls'], a[href$='.xlsx'], a[href$='.zip'], a[href$='.wps'],
      a.nfw-cms-attachment, a[href*='/attachment/']

columns: []
