novel-scraper

智能小说抓取工具,支持自动翻页、分页补全、章节号自动解析。 使用 curl+BeautifulSoup 抓取笔趣阁等小说网站,输出格式化 TXT 文件。 默认每 10 章合并为一个文档,避免文件零散分布。 自动检测分页并补全,智能跳过非小说内容(作者感言、抽奖预告等)。 Use when: 抓取网络小说章节、批量下载小说内容、保存小说为 TXT 格式。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "novel-scraper" with this command: npx skills add yuzhihui886/novel-scraper

Novel Scraper - 小说抓取工具

版本说明:novel-scraper 提供两个版本,根据需求选择使用。


📦 版本对比

特性v1.4.0(生产版)V5(智能版)
章节号解析URL ID 推算标题提取 ✅
分页检测❌ 无✅ 自动 ✅
分页补全❌ 无✅ 自动(最多 5 页)✅
非小说跳过❌ 无✅ 智能判断 ✅
质量验证❌ 无✅ 基础验证 ✅
连续性检查❌ 无✅ 自动检查 ✅
代码量34KB18KB
速度⚡ 最快⚡ 快
推荐场景日常批量抓取高质量/分页章节

🚀 快速开始

v1.5.0(推荐)- 按章节号抓取

cd ~/.openclaw/workspace/skills/novel-scraper
python3 scripts/scraper_v5.py \
  --chapters 301-400 \
  --book "没钱修什么仙" \
  --merge-interval 10

特点

  • 按章节号精确筛选(修复索引切片 bug)
  • ✅ 自动提示缺失章节
  • ✅ 分页自动补全
  • ✅ 适合按章节范围抓取的场景

v1.4.0(生产版)- 日常使用

cd ~/.openclaw/workspace/skills/novel-scraper
python3 scripts/scraper.py \
  --urls "https://www.bqquge.com/4/1962,https://www.bqquge.com/4/1963,..." \
  --book "没钱修什么仙" \
  --merge-interval 10

特点

  • ✅ 稳定可靠
  • ✅ 速度最快
  • ✅ 适合已知章节 URL 连续的场景

V5(智能版)- 高质量抓取

python3 scripts/scraper_v5.py \
  --chapters 301-400 \
  --book "没钱修什么仙" \
  --merge-interval 10

特点

  • ✅ 章节号自动解析
  • ✅ 分页自动补全
  • ✅ 非小说内容智能跳过
  • ✅ 适合分页章节较多的场景

📋 命令行参数

v1.5.0 参数(推荐)

参数说明默认值
--chapters章节号范围(格式:起始 - 结束-
--url单章 URL-
--urls多章 URL(逗号分隔)-
--book书名自动提取
--merge-interval每 N 章合并10
--memory-limit内存限制 MB2500
--auto-close每 N 章释放内存3
--retry重试次数3

⚠️ v1.5.0 重要修复

  • 修复索引切片 bug(之前 data[300:400] 错误对应章节号 300-419)
  • 新增 --chapters 参数,按章节号精确筛选
  • 自动提示缺失章节(网站目录中没有的章节)

V5 参数

参数说明默认值
--chapters章节号范围(格式:起始 - 结束-
--url单章 URL-
--urls多章 URL(逗号分隔)-
--book书名自动提取
--merge-interval每 N 章合并10
--strict严格质量验证关闭
-v详细日志关闭

📁 输出位置

~/.openclaw/workspace/novels/

文件名格式

  • 多章合并:书名_第 X-Y 章.txt
  • 单章:书名_第 X 章.txt

🧪 测试验证

测试场景版本结果
第 1-10 章V5✅ 119KB,完整
第 11-20 章V5✅ 100KB,完整
第 111-210 章v1.4.0✅ 10 个文件,~700KB
分页补全V5✅ 28 段→112 段
非小说跳过V5✅ 自动跳过

🔧 故障排除

抓取内容为空

  1. 检查 URL 格式
  2. 清除缓存:rm -rf /tmp/novel_scraper_cache/*
  3. 检查网站是否可访问

章节号不正确

  • 使用 V5 自动从标题解析章节号

文件保存位置

ls -lt ~/.openclaw/workspace/novels/ | head -5

版本: 1.4.0
更新: 2026-04-02
详见: CHANGELOG.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

中文小说写作

中文长篇小说创作工作流。用于创建或延续单本书项目、提炼原作/样本文风、规划章节、起草或修订正文、执行章节 preflight、编号检查、质量门、Markdown 交付、更新本书记忆与连续性。

Registry SourceRecently Updated
270Profile unavailable
General

Scrapeless LLM Chat Scraper Skill

Scrape AI chat conversations from ChatGPT, Gemini, Perplexity, Copilot, Google AI Mode, and Grok.

Registry SourceRecently Updated
2190Profile unavailable
General

Gov Permit Scraper

Scrape government permit databases (liquor licenses, business registrations, contractor permits, health permits) to generate B2B sales leads. Enriches raw pe...

Registry SourceRecently Updated
2860Profile unavailable
General

Creativault Creator Scraper

Creativault creator data collection skill. Search and collect creator/influencer data from TikTok, YouTube, and Instagram. Supports multi-dimensional search,...

Registry SourceRecently Updated
1790Profile unavailable