← 返回 Skills 市场
91
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install jisilu-cb-daily
功能描述
每日从集思录 webapi 抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储
使用说明 (SKILL.md)
前置依赖
- Python 3.8+
- 依赖包:
requests,pandas - 集思录账号(需要登录后的
kbzw__user_login和kbzw__SessionCookie)
Cookie 管理规范
存储位置
Cookie 存储在 Skill 目录下的 references/cookie.json:
{
"kbzw__user_login": "用户输入的cookie值",
"kbzw__Session": "用户输入的session值",
"updated_at": "2026-04-28"
}
检查逻辑
-
每次执行任务前,先检查
references/cookie.json是否存在且包含kbzw__user_login和kbzw__Session -
如果任一不存在或为空,立即停止数据抓取,向用户发送以下提示:
【集思录登录Cookie缺失】 本Skill需要两个Cookie才能获取完整数据(尤其是cb/list等会员数据): 1. kbzw__user_login 2. kbzw__Session 请按以下步骤获取: 1. 用Chrome/Edge打开 https://www.jisilu.cn/ 并登录账号 2. F12打开开发者工具 → Application/应用 → Cookies → https://www.jisilu.cn 3. 分别找到 kbzw__user_login 和 kbzw__Session,复制它们的Value值 4. 依次将两个Cookie值粘贴给我 获取后我将自动保存,后续每日抓取无需重复输入。 -
收到用户提供的 Cookie 后,写入
references/cookie.json,然后继续执行
数据源与接口
接口1:可转债基本数据
- URL:
https://www.jisilu.cn/webapi/cb/list/ - 方法: GET
- Headers:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Referer: https://www.jisilu.cn/web/data/cb/list Cookie: kbzw__user_login={cookie值}; kbzw__Session={session值} - 返回格式: JSON 平铺数组,直接取
data字段{ "data": [ { "bond_id": "123045", "bond_nm": "某转债", "price": 105.50, "increase_rt": 1.23, "stock_nm": "某正股", "sprice": 10.50, "sincrease_rt": 2.10, "convert_price": 12.50, "convert_value": 84.00, "premium_rt": 25.60, "force_redeem_price": 16.25, "put_convert_price": 8.75, "year_left": 3.52, "ytm_rt": 2.35, "rating_cd": "AA+", "dblow": 131.10, "force_redeem": null, "maturity_dt": "2027-06-15" } ] }
接口2:强赎倒计时数据
- URL:
https://www.jisilu.cn/webapi/cb/redeem/ - 方法: GET
- Headers: 同上,需携带 Cookie
- 返回格式: JSON 平铺数组
data - 关键字段:
bond_id: 转债代码bond_nm: 转债名称redeem_count: 已满足强赎天数redeem_trigger: 强赎触发条件(如 15/30)redeem_status: 强赎状态(如"公告强赎"、"暂不强赎"、"倒计时中")redeem_price: 赎回价格last_redeem_dt: 最后交易日
接口3:下修倒计时数据(主表,340条全量)
- URL:
https://www.jisilu.cn/webapi/cb/adjust/ - 方法: GET
- Headers: 同上,需携带 Cookie
- 返回格式: JSON 平铺数组
data - 关键字段:
bond_id: 转债代码bond_nm: 转债名称adjust_count: 已满足下修天数adjust_trigger: 下修触发条件adjust_status: 下修状态(如"已公告下修"、"董事会提议"、"倒计时中")adjust_price: 拟下修价格(如有)adjust_dt: 下修股东大会日期
执行工作流
Step 1: Cookie 检查与准备
import json, os
cookie_path = os.path.join(os.path.dirname(__file__), "../references/cookie.json")
if not os.path.exists(cookie_path):
raise FileNotFoundError("Cookie文件缺失,请按Skill说明提供 kbzw__user_login 和 kbzw__Session")
with open(cookie_path, "r", encoding="utf-8") as f:
cookie_data = json.load(f)
kbzw_cookie = cookie_data.get("kbzw__user_login", "")
kbzw_session = cookie_data.get("kbzw__Session", "")
if not kbzw_cookie or not kbzw_session:
raise ValueError("kbzw__user_login或kbzw__Session为空,请重新提供")
Step 2: 抓取下修倒计时数据(主表)
- 使用
requests.get()访问https://www.jisilu.cn/webapi/cb/adjust/ - 携带 Cookie:
kbzw__user_login={kbzw_cookie}; kbzw__Session={kbzw_session} - 解析 JSON,直接取
data字段为 DataFrame(约340条全量数据)
Step 3: 抓取强赎倒计时数据
- 使用相同 Cookie 访问
https://www.jisilu.cn/webapi/cb/redeem/ - 解析 JSON,直接取
data字段 - 以
bond_id为键,LEFT JOIN 到下修主表
Step 4: 抓取基本数据
- 使用相同 Cookie 访问
https://www.jisilu.cn/webapi/cb/list/ - 解析 JSON,直接取
data字段 - 以
bond_id为键,LEFT JOIN 到已有数据
Step 5: 数据清洗与保存
清洗规则
- 价格字段:去除
%符号,转为 float - 涨跌幅:同上处理
- 日期字段:统一转为
YYYY-MM-DD格式 - 空值处理:
force_redeem为空表示"暂不强赎";adjust_status为空表示"未触发下修" - 去重:按
bond_id去重,保留最新记录
保存格式
数据保存为 CSV,按日期命名:
output/
└── jisilu_cb_2026-04-28.csv
CSV 必须包含以下核心字段:
| 字段名 | 来源 | 说明 |
|---|---|---|
| bond_id | adjust(主表) | 转债代码 |
| bond_nm | adjust(主表) | 转债名称 |
| price | list | 转债现价 |
| increase_rt | list | 转债涨跌幅 |
| stock_nm | list | 正股名称 |
| sprice | list | 正股现价 |
| premium_rt | list | 溢价率 |
| convert_price | list | 转股价 |
| year_left | list | 剩余年限 |
| ytm_rt | list | 到期收益率 |
| rating_cd | list | 评级 |
| dblow | list | 双低值 |
| force_redeem_price | list | 强赎触发价 |
| put_convert_price | list | 回售触发价 |
| redeem_status | redeem | 强赎状态 |
| redeem_count | redeem | 已满足强赎天数 |
| adjust_status | adjust(主表) | 下修状态 |
| adjust_count | adjust(主表) | 已满足下修天数 |
| adjust_dt | adjust(主表) | 下修股东大会日期 |
| data_date | 系统生成 | 数据日期(YYYY-MM-DD) |
Step 6: 结果汇报
向用户汇报当日数据概况:
【集思录可转债数据抓取完成】
日期:2026-04-28
共抓取转债:XXX 只
其中:
- 公告强赎:XX 只
- 强赎倒计时中:XX 只
- 已公告下修:XX 只
- 下修倒计时中:XX 只
数据已保存至:output/jisilu_cb_2026-04-28.csv
异常处理
| 异常场景 | 处理方式 |
|---|---|
| Cookie 失效(返回 403/登录页) | 提示用户重新输入 Cookie,删除旧 cookie.json |
| 接口返回空数据 | 记录日志,重试最多 3 次,仍失败则跳过该接口 |
| 网络超时 | 设置 timeout=30s,重试 3 次 |
| 字段缺失 | 用空值填充,不中断流程 |
| 日期解析失败 | 保留原始字符串,标注"解析异常" |
定时执行建议
如需每日自动执行,可在本地 OpenClaw 中配合 cron/systemd:
# 每天 15:30 收盘后执行
30 15 * * * cd ~/.config/agents/skills/jisilu-cb-daily && python scripts/collect_jisilu_cb.py
或在 Kimi Claw 对话中每日发送指令:
执行 jisilu-cb-daily Skill 抓取今日可转债数据
安全使用建议
This skill appears to do what it says, but it requires your jisilu login cookies (kbzw__user_login and kbzw__Session). Before installing or running: 1) Only run this skill in a trusted, local environment — do not paste your cookies into public or remote chats/logs. 2) Prefer creating a dedicated account with minimal privileges if possible. 3) Secure or delete references/cookie.json after use (it stores live auth tokens). 4) Cron logs may capture output (the script prints cookie prefixes); redirect or secure logs to avoid leaking tokens. 5) If you need stronger safety, modify the script to read cookies from a secure secret store or encrypt the cookie file.
功能分析
Type: OpenClaw Skill
Name: jisilu-cb-daily
Version: 1.0.4
The skill is designed to scrape financial data from jisilu.cn and requires the user to provide sensitive session cookies (kbzw__user_login and kbzw__Session). While the code in scripts/collect_jisilu_cb.py and the instructions in SKILL.md appear aligned with the stated purpose, the bundle handles raw session credentials and performs automated file system and network operations, which are classified as risky capabilities. No evidence of intentional malice or data exfiltration to unauthorized third-party domains was found, but the handling of authentication tokens and the instructions for the agent to persist them locally in references/cookie.json represent a significant attack surface.
能力评估
Purpose & Capability
Name/description describe scraping jisilu webapi for convertible-bond data; the script calls exactly the three jisilu endpoints listed (list/redeem/adjust), parses JSON, merges and saves CSV. Required artifacts (kbzw__user_login and kbzw__Session cookies) are exactly what the site requires for member data access.
Instruction Scope
SKILL.md and the script only read/write local files (references/cookie.json, output CSV) and call jisilu.cn endpoints. However, the runtime instructions ask the user to copy-paste their site cookies into the skill (potentially via the chat interface). That is functional for the task but sensitive: if you paste cookies into a remote/third-party chat or untrusted logs, you risk credential exposure. The script also prints the first 10 characters of cookies to stdout, which may appear in logs.
Install Mechanism
No install spec; this is an instruction-only skill with a Python script. Declared Python dependencies (requests, pandas) match the script. Nothing is downloaded from untrusted URLs or installed automatically by the skill.
Credentials
The skill requests no environment variables or external credentials beyond the site cookies (kbzw__user_login and kbzw__Session). That is proportional to the stated need. Those cookies are sensitive authentication tokens—users should treat them as secrets and avoid sharing them over untrusted channels.
Persistence & Privilege
The skill does persist data locally (references/cookie.json and output/*.csv) but has no elevated platform privileges (always:false). It does not modify other skills or system-wide configuration. The suggested cron usage is ordinary for local automation.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install jisilu-cb-daily - 安装完成后,直接呼叫该 Skill 的名称或使用
/jisilu-cb-daily触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
修复:
下修统计字段名不匹配:脚本统计 adjust_status(不存在),实际有效字段是 adjust_remain_days(-1=未触发,≥0=倒计时中)
price 为 NaN:list 接口仅 30 条,合并时覆盖了 adjust 的 price 字段,导致大部分缺失
v1.0.3
- 增加对 kbzw__Session Cookie 的必填校验,抓取数据需同时提供 kbzw__user_login 和 kbzw__Session 两个 Cookie
- 更新 Cookie 检查、报错和用户引导文案,要求用户依次提供两个 Cookie
- 更新请求 headers,所有接口均需同时带上两个 Cookie
- 相关代码和表结构描述同步调整,保证新增 Cookie 字段正确处理
v1.0.2
1.0.2 (2026-04-28)
- 接口迁移:/web/data/cb/* → /webapi/cb/*(JSON 直出)
- 解析逻辑:rows→cell 嵌套 → data 平铺数组
- 执行顺序:adjust(主表) → redeem(强赎) → list(补充)
- 新增字段:redeem_orders、adjust_remain_days、drdays、adj_scnt
- 修复合并冲突:去重逻辑避免 bond_id 字段重复
v1.0.1
- 新增详细的 Cookie 管理与缺失时用户引导说明,支持手动输入与本地持久化
- 集成集思录三大接口(基本数据、强赎倒计时、下修倒计时),并标准化字段
- 自动数据清洗、合并与每日本地 CSV 存储,规范字段与命名
- 增强异常处理,自动提示 Cookie 失效、接口异常或字段缺失,并重试策略
- 完善用户汇报流程,包括数据汇总与关键事件统计
元数据
常见问题
每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储 是什么?
每日从集思录 webapi 抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 91 次。
如何安装 每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install jisilu-cb-daily」即可一键安装,无需额外配置。
每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储 是免费的吗?
是的,每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储 支持哪些平台?
每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 每日从集思录抓取可转债基本数据、强赎倒计时、下修倒计时,支持Cookie管理和本地持久化存储?
由 ccHunter(@cchunter)开发并维护,当前版本 v1.0.4。
推荐 Skills