Hk Financial Downloader

v1.0.1

港股公司财报完整下载器。自动从东方财富/同花顺/披露易获取年报、中期报告、季报、招股书,完整报告优先于业绩公告。

1· 87·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for cgxxxxxxxxxxxx/hk-financial-downloader.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Hk Financial Downloader" (cgxxxxxxxxxxxx/hk-financial-downloader) from ClawHub.
Skill page: https://clawhub.ai/cgxxxxxxxxxxxx/hk-financial-downloader
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install hk-financial-downloader

ClawHub CLI

Package manager switcher

npx clawhub@latest install hk-financial-downloader
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (HK financial PDF downloader) align with its actions: the script issues HTTP requests to eastmoney, 10jqka and hkex and downloads PDFs into the agent workspace. Required binary python3 is appropriate. Minor mismatch: SKILL.md metadata lists a pip dependency on 'requests' while the included script uses urllib (no 'requests' import) — this is an implementation/documentation inconsistency but not a capability mismatch.
Instruction Scope
Runtime instructions tell the agent to run the included Python script and to download PDFs from the three stated domains. The instructions do not ask the agent to read unrelated files or environment variables, nor to send data to unexpected remote endpoints. The script writes output to a fixed agent workspace path (/root/.openclaw/workspace/archive) — this is consistent with the described output structure but worth noting because it assumes that path is writable in the runtime environment.
Install Mechanism
There is no install spec (instruction-only + one script), so nothing external is downloaded/installed by the platform. This is low-risk. Note: SKILL.md metadata advertised pip:['requests'] but there is no package install spec in the registry; that inconsistency is likely harmless but should be cleaned up.
Credentials
The skill requests no environment variables or credentials and only performs unauthenticated GET/POST requests to public data sources (eastmoney, 10jqka, hkex). There are no calls to unrelated cloud providers or requests for secrets. It does write files into the agent workspace, which is a normal and expected behavior for a downloader.
Persistence & Privilege
The skill is not marked always:true and is user-invocable. It does not request persistent system-wide privileges or modify other skills' configuration. There is no evidence it attempts to enable itself or store external tokens beyond writing downloaded files into its workspace.
Assessment
This skill is internally consistent for downloading HK financial PDFs from the listed public sites. Before installing/running: (1) review and, if desired, run the included script in an isolated environment (sandbox or container) because it performs network requests and writes files to the local workspace; (2) note the script writes into /root/.openclaw/workspace/archive — ensure the runtime user has appropriate permissions or modify BASE_ARCHIVE to a safer path; (3) the SKILL.md metadata lists 'requests' as a pip dependency but the script uses urllib — no secrets are required, but you may want to remove unused dependency declarations; (4) because the source is unknown, if you will run this on a machine with sensitive network access, prefer a limited-network or ephemeral environment to reduce risk. Overall the behavior matches the described purpose and no unrelated credential access or obfuscated exfiltration was found.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📊 Clawdis
OSLinux · macOS · Windows
Binspython3
latestvk970bvwbakx222ke26792pep2984ppmw
87downloads
1stars
2versions
Updated 2w ago
v1.0.1
MIT-0
Linux, macOS, Windows

港股公司财报下载 Skill

版本: v1.0.0 (2026-04-12)
适用市场: 港股 (HKEX)
覆盖公司: 任意港股公司(通过股票代码)


数据源优先级

优先级数据源APIPDF 来源特点
1️⃣东方财富np-anotice-stock.eastmoney.compdf.dfcfw.com完整报告最多,覆盖最广
2️⃣同花顺basic.10jqka.com.cnHKEX 直链补充东方财富缺失的年份
3️⃣披露易www1.hkexnews.hkHKEX 直链兜底,官方权威源

各数据源覆盖对比(以腾讯 0700 为例)

文档类型东方财富同花顺披露易
完整年报 (年報)22 份 (2005-2025)12 份 (2014-2025)全部
完整中期报告20 份 (2004-2025)11 份 (2015-2025)全部
Q3 季报19 份 (2007-2025)12 份 (2012-2025)全部
Q1 季报9 份14 份 (2012-2025)全部
招股书4 份3 份全部

核心原则

  • 完整报告优先于业绩公告:同年有"年報"就不要"全年业绩公布"
  • 去重:同年同类型只保留一份(优先完整版)
  • PDF 验证:下载后验证 Content-Type: application/pdf

快速开始

下载单家公司

python3 /root/.openclaw/workspace/skills/hk-financial-downloader/scripts/hk_downloader.py \
  --stock=0700 --from=2020 --to=2025 --type=all --pdf

批量下载

python3 /root/.openclaw/workspace/skills/hk-financial-downloader/scripts/hk_downloader.py \
  --stocks=0700,9988,3690,1810 --from=2020 --to=2025 --pdf

自动代码格式转换

脚本自动将输入的股票代码转换为各数据源所需的格式:

输入东方财富同花顺披露易
70000700HK07000700
070000700HK07000700
0070000700HK07000700
HK070000700HK07000700
998809988HK99889988
251302513HK25132513

参数说明

参数说明默认示例
--stock股票代码(5 位)必填0700
--stocks批量股票代码(逗号分隔)-0700,9988,3690
--from起始年份2020--from=2015
--to结束年份2025--to=2025
--type报告类型all年报, 中报, 季报, 招股书, all
--pdf下载 PDF 文件--pdf
--source数据源优先级eastmoney,10jqka,hkex--source=eastmoney

报告类型

类型参数说明
年报年报, annual完整年報 PDF(非业绩公告)
中报中报, interim完整中期报告 PDF
季报季报, quarterlyQ1 + Q3 业绩公告
招股书招股书, prospectus招股章程/全球发售
全部all以上全部

输出结构

/root/.openclaw/workspace/archive/{code}_{name}/
├── financial_reports/
│   ├── annual/          # 完整年报 (年報)
│   │   ├── 2025_年报_2025 年报.pdf
│   │   ├── 2024_年报_2024 年报.pdf
│   │   └── ...
│   ├── interim/         # 完整中期报告
│   │   ├── 2025_中报_中期报告 2025.pdf
│   │   ├── 2024_中报_中期报告 2024.pdf
│   │   └── ...
│   ├── quarterly/       # 季报 (Q1/Q3 业绩公告)
│   │   ├── 2025_Q3_截至2025年9月30日止三个月及九个月业绩公布.pdf
│   │   ├── 2025_Q1_截至2025年3月31日止三个月业绩公布.pdf
│   │   └── ...
│   └── prospectus/      # 招股书
│       ├── 2017_招股书_建议分拆中国文学...pdf
│       └── ...
└── manifest.json        # 下载清单

API 技术细节

自动代码格式转换

# 东方财富: 5位数字 (00700)
def format_code_eastmoney(code):  # 0700 → 00700

# 同花顺: HK + 4位有效数字 (HK0700)
def format_code_10jqka(code):  # 0700 → HK0700

# 披露易: 4位数字 (0700)
def format_code_hkex(code):  # 0700 → 0700

用户输入任意格式的代码(700/0700/00700/HK0700),脚本自动转换。

1. 东方财富(优先)

# 公告列表 API
GET https://np-anotice-stock.eastmoney.com/api/security/ann
Params:
  - stock_list: {code}        # 如 "00700"
  - ann_type: H               # H=港股
  - page_size: 100
  - page_index: 1

# PDF 下载(直接拼接)
GET https://pdf.dfcfw.com/pdf/H2_{art_code}_1.pdf

完整报告识别

  • 年报:标题含 年報年度报告Annual Report
  • 中期报告:标题含 中期報告中期报告Interim Report
  • 业绩公告:标题含 全年业绩/六个月业绩/九个月业绩/三个月业绩

2. 同花顺(补充)

# 公告列表 API
GET https://basic.10jqka.com.cn/basicapi/notice/pub
Params:
  - type: hk                  # hk=港股
  - code: HK{code}            # 如 "HK0700"
  - classify: all
  - page: 1
  - limit: 15

# PDF 下载(从 raw_url 获取)
raw_url → 直接下载 HKEX PDF

3. 披露易(兜底)

# 获取 stockId
GET https://www1.hkexnews.hk/search/prefix.do
Params:
  - type: A
  - market: SEHK
  - name: {stock_code}
  - lang: ZH

# 搜索公告
POST https://www1.hkexnews.hk/search/titlesearch.xhtml
Form Data:
  - stockId: {stockId}
  - from: {YYYYMMDD}
  - to: {YYYYMMDD}
  - t1code: 40000
  - t2code: 40200

使用示例

示例 1: 下载腾讯 2020-2025 完整报告

python3 hk_downloader.py --stock=0700 --from=2020 --to=2025 --pdf

输出:

📊 港股财报下载: 腾讯控股 (0700.HK)
📡 数据源: 东方财富 → 同花顺 → 披露易
📅 时间范围: 2020-2025

【1/3】东方财富获取公告...
  获取 1401 条公告,筛选出 52 份核心文档

【2/3】去重: 完整报告优先
  年报: 8 份 (完整)
  中报: 6 份 (完整)
  Q1季报: 6 份
  Q3季报: 6 份

【3/3】下载 PDF...
  ✅ 2025_年报_2025 年报.pdf (964KB)
  ✅ 2024_年报_2024 年报.pdf (978KB)
  ✅ 2025_中报_中期报告 2025.pdf (12480KB)
  ...
  总计: 26/26 成功

示例 2: 只下载年报

python3 hk_downloader.py --stock=0700 --type=年报 --pdf

示例 3: 只获取清单,不下载 PDF

python3 hk_downloader.py --stock=0700 --from=2020 --to=2025

示例 4: 批量下载

python3 hk_downloader.py --stocks=0700,9988,3690 --from=2022 --to=2025 --pdf

已知 stockId 映射(披露易用)

公司代码stockId
腾讯控股007007609
阿里巴巴099881000015694
美团03690198419
小米01810190371
京东096181000042149
网易099991000041666
比亚迪012112696
农夫山泉096331000054238
智谱 AI02513(需自动获取)

去重规则

年报去重

同年有 "年報" (完整) → 保留 "年報",丢弃 "全年业绩公布"
只有 "全年业绩公布" → 保留

中报去重

同年有 "中期報告" (完整) → 保留 "中期報告",丢弃 "六个月业绩公布"
只有 "六个月业绩公布" → 保留

季报

Q1 和 Q3 只有业绩公告,无冲突

注意事项

1. 频率控制

  • 东方财富:每次请求间隔 ≥ 0.2 秒
  • 同花顺:每次请求间隔 ≥ 0.1 秒
  • 披露易:每次请求间隔 ≥ 1 秒

2. 数据源选择

  • 默认使用 eastmoney,10jqka,hkex 三级优先级
  • 可指定单一数据源:--source=eastmoney

3. 失败处理

  • PDF 下载失败:自动尝试下一个数据源
  • API 超时:重试 3 次后跳过

4. 文件名规范

  • 年报:{year}_年报_{title}.pdf
  • 中报:{year}_中报_{title}.pdf
  • 季报:{year}_{Q1/Q3}_{title}.pdf
  • 招股书:{year}_招股书_{title}.pdf

相关资源


作者: 玄武 🐢
创建日期: 2026-04-12
基于: 东方财富 API + 同花顺 API + 披露易 API 验证

Comments

Loading comments...