← 返回
未分类

CNInfo Reports

Batch-download formal A-share annual and semiannual report PDFs from CNInfo (巨潮资讯) using a stock-code CSV. Supports dry-run preview, resume on failure, force...
Batch-download formal A-share annual and semiannual report PDFs from CNInfo (巨潮资讯) using a stock-code CSV. Supports dry-run preview, resume on failure, force...
gclyde768-arch gclyde768-arch 来源
未分类 clawhub v1.0.1 1 版本 99784 Key: 无需
★ 0
Stars
📥 462
下载
💾 22
安装
1
版本
#a-share#annual-report#cninfo#finance#latest#semiannual-report

概述

CNInfo Report Downloader(巨潮资讯报告下载)

批量下载A股上市公司年报/半年报 PDF(数据源:巨潮资讯 cninfo.com.cn)。

When to activate

  • User wants to download A-share annual or semiannual reports
  • User mentions 巨潮、cninfo、年报下载、半年报、annual report
  • User needs to batch-fetch report PDFs from a stock-code list

Prerequisites

pip install -r requirements.txt

Workflow

  1. Confirm that a stock CSV exists and that its first column contains stock codes (6-digit A-share codes).
  2. If unsure, run --dry-run first to preview matches without downloading.
  3. Run the command from the skill directory. The script tracks progress in SQLite and can resume after interruption.
  4. Check runtime/manifest_.csv and runtime/logs/cninfo_.log after the run.
  5. Consult references/filter_rules.md only when adjusting title matching, naming, or reset behavior.

Commands

Normal download (default year 2025):

python scripts/run_cninfo_reports.py --stock-csv <path-to-csv>

Dry-run (preview only, no download):

python scripts/run_cninfo_reports.py --stock-csv <path-to-csv> --dry-run

Specify year:

python scripts/run_cninfo_reports.py --stock-csv <path-to-csv> --year 2024

Force redownload (ignore cache):

python scripts/run_cninfo_reports.py --stock-csv <path-to-csv> --force-redownload

Full CLI options:

ArgumentDefaultDescription
---------
--year2025Target report year
--stock-csv上市公司基础信息.csvCSV with stock codes in column 1
--output-dirdownloads/PDF output directory
--runtime-dirruntimeState, manifest, logs directory
--page-size20Search results per page
--sleep-seconds1.2Min delay between requests
--timeout-seconds30HTTP timeout
--max-retries5HTTP retry attempts
--dry-runfalsePreview matches without downloading
--force-redownloadfalseRe-download even if file exists

Features

  • Smart title filtering — regex-based matching for formal annual/semiannual reports; auto-rejects summaries, English variants, ESG reports, notices, etc.
  • Breakpoint resume — SQLite state tracks search progress and download status per announcement; resumes after interruption.
  • Manifest outputruntime/manifest_.csv with full metadata for every eligible report.
  • Idempotent naming{code}_{year}_{kind}.pdf for primary files, extra variants get _{announcement_id} suffix.

Architecture

scripts/
  run_cninfo_reports.py          # Entry point
  cninfo_annual_reports/
    cli.py                       # Argument parsing & logging
    config.py                    # AppConfig dataclass
    service.py                   # Core orchestration logic
    repository.py                # SQLite state management
    http_client.py               # CNInfo API & file download
    models.py                    # Data models
    filters.py                   # Title evaluation & regex
references/
  filter_rules.md                # Detailed filter/reset docs
agents/
  openai.yaml                    # Codex integration config

Reset

To restart from scratch, delete state files:

rm runtime/state.db runtime/state.db-wal runtime/state.db-shm

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-31 09:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 208 📥 67,507
data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 296 📥 139,495
data-analysis

Stock Watcher

robin797860
管理和监控个人股票自选列表,支持利用同花顺数据添加、删除、列出股票及汇总近期表现。适用于用户希望追踪特定股票、获取表现汇总或管理自选列表时。
★ 112 📥 46,017