@cloud411716/fancy-webnovel 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -4
- package/plugins/fancy-bootstrap/index.js +3 -122
- package/plugins/fancy-bootstrap/registry.js +294 -0
- package/plugins/fancy-scan/index.js +197 -0
- package/plugins/fancy-scan/scripts/run-scan.js +453 -0
- package/plugins/fancy-scan/scripts/scan-output-format.md +207 -0
- package/plugins/fancy-scan/scripts/scraper-registry.md +115 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# 平台 × 篇幅 → Scraper 映射表
|
|
2
|
+
|
|
3
|
+
## 平台速查
|
|
4
|
+
|
|
5
|
+
| 平台 | 中文 | 默认篇幅 | 支持长篇? | 支持短篇? |
|
|
6
|
+
|------|------|---------|-----------|-----------|
|
|
7
|
+
| `qidian` | 起点 | 长篇 | ✅ | ❌ |
|
|
8
|
+
| `fanqie` | 番茄 | 长篇 | ✅ | ❌ |
|
|
9
|
+
| `jinjiang` | 晋江 | 长篇 | ✅ | ❌ |
|
|
10
|
+
| `zhihu` | 知乎 | 需选择 | ✅ | ✅ |
|
|
11
|
+
| `dianzhong` | 点众 | 短篇 | ❌ | ✅ |
|
|
12
|
+
| `qimao` | 七猫 | 需选择 | ✅ | ✅ |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Chrome CDP 环境要求
|
|
17
|
+
|
|
18
|
+
> ⚠️ **除 qidian 外,其他所有 scraper 都需要先启动 Chrome CDP**:
|
|
19
|
+
> ```bash
|
|
20
|
+
> node {SKILL_DIR}/browser-cdp/scripts/setup-cdp-chrome.js --yes
|
|
21
|
+
> ```
|
|
22
|
+
> qidian 默认走 mobile-SSR(不需要 Chrome),失败才降级 CDP。
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Scraper 映射
|
|
27
|
+
|
|
28
|
+
### 起点(qidian)
|
|
29
|
+
|
|
30
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
31
|
+
|------|---------|---------|---------|
|
|
32
|
+
| 长篇 | qidian-rank-scraper.js | **mobile-SSR 优先**(不需要 Chrome)| `node qidian-rank-scraper.js --type hotsales --outdir {out}` |
|
|
33
|
+
|
|
34
|
+
### 番茄(fanqie)
|
|
35
|
+
|
|
36
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
37
|
+
|------|---------|---------|---------|
|
|
38
|
+
| 长篇 | fanqie-rank-scraper.js | CDP(需要 Chrome)| `node fanqie-rank-scraper.js --channel all --type all --outdir {out}` |
|
|
39
|
+
|
|
40
|
+
### 晋江(jinjiang)
|
|
41
|
+
|
|
42
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
43
|
+
|------|---------|---------|---------|
|
|
44
|
+
| 长篇 | jjwxc-rank-scraper.js | CDP(需要 Chrome)| `node jjwxc-rank-scraper.js --type 12 --outdir {out}` |
|
|
45
|
+
|
|
46
|
+
### 知乎(zhihu)
|
|
47
|
+
|
|
48
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
49
|
+
|------|---------|---------|---------|
|
|
50
|
+
| 长篇 | zhihu-rank-scraper.js | CDP(需要 Chrome)| `node zhihu-rank-scraper.js --length long --outdir {out}` |
|
|
51
|
+
| 短篇 | zhihu-rank-scraper.js | CDP(需要 Chrome)| `node zhihu-rank-scraper.js --length short --outdir {out}` |
|
|
52
|
+
|
|
53
|
+
入口 URL:`https://www.zhihu.com/fiore/h5/vip-web`
|
|
54
|
+
|
|
55
|
+
- 短篇自动点击 4 个 tab:推荐榜 / 热搜榜 / 热度榜 / 口碑榜
|
|
56
|
+
- 长篇自动点击 1 个 tab:长篇榜
|
|
57
|
+
|
|
58
|
+
> ⚠️ 知乎**需要登录**才能看完整榜单。先在 Chrome 中手动登录 zhihu.com 再采集。
|
|
59
|
+
|
|
60
|
+
### 点众(dianzhong)
|
|
61
|
+
|
|
62
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
63
|
+
|------|---------|---------|---------|
|
|
64
|
+
| 短篇 | dz-browse-scraper.js | CDP(需要 Chrome)| `node dz-browse-scraper.js --channel all --outdir {out}` |
|
|
65
|
+
|
|
66
|
+
### 七猫(qimao)
|
|
67
|
+
|
|
68
|
+
| 篇幅 | Scraper | 采集模式 | 示例命令 |
|
|
69
|
+
|------|---------|---------|---------|
|
|
70
|
+
| 长篇 | qimao-rank-scraper.js | CDP(需要 Chrome)| `node qimao-rank-scraper.js --type hot --period day --outdir {out}` |
|
|
71
|
+
| 短篇 | qimao-rank-scraper.js | CDP(需要 Chrome)| `node qimao-rank-scraper.js --type hot --period day --gender f --outdir {out}` |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 长短篇判断规则
|
|
76
|
+
|
|
77
|
+
**如果用户只写了 `qimao` 或 `zhihu` 而没有写 `long`/`short`**:
|
|
78
|
+
- 主会话**必须**用 clarify 弹出:`{平台中文名} 同时支持长篇和短篇,请输入 长篇/短篇`
|
|
79
|
+
- 禁止跳过此步骤
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 脚本路径约定
|
|
84
|
+
|
|
85
|
+
Scraper 脚本统一放在 `{SKILL_DIR}/references/` 下:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
fancy-scan/
|
|
89
|
+
├── SKILL.md
|
|
90
|
+
└── references/
|
|
91
|
+
├── run-scan.py ← Python 编排层
|
|
92
|
+
├── scraper-registry.md ← 本文件
|
|
93
|
+
├── scan-output-format.md
|
|
94
|
+
├── cdp-utils.js
|
|
95
|
+
├── qidian-rank-scraper.js
|
|
96
|
+
├── fanqie-rank-scraper.js
|
|
97
|
+
├── jjwxc-rank-scraper.js
|
|
98
|
+
├── zhihu-rank-scraper.js
|
|
99
|
+
├── dz-browse-scraper.js
|
|
100
|
+
└── qimao-rank-scraper.js
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
> ⚠️ 如果 `{SKILL_DIR}/references/` 下没有某个 scraper,run-scan.py 回退到"内置知识"模式,输出占位符报告并标注 `[内置知识-未采集]`。
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 输出文件命名规范
|
|
108
|
+
|
|
109
|
+
`{平台}{榜单名称}_{YYYYMMDD}.md`
|
|
110
|
+
|
|
111
|
+
例:
|
|
112
|
+
- `起点畅销榜_20260827.md`
|
|
113
|
+
- `番茄男频阅读榜_20260827.md`
|
|
114
|
+
- `七猫大热榜_20260827.md`
|
|
115
|
+
- `点众男频短篇_20260827.md`
|