@cloud411716/fancy-webnovel 0.2.16 → 0.2.18
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
CHANGED
|
@@ -199,9 +199,10 @@ function scraperArgs(platform, length, outDir) {
|
|
|
199
199
|
extra: ['--channel', 'all', '--top', '20', '--outdir', outDir],
|
|
200
200
|
};
|
|
201
201
|
case 'jinjiang':
|
|
202
|
+
// 月榜(orderstr=5) + 新手金榜(orderstr=17),--type all 扫全部
|
|
202
203
|
return {
|
|
203
204
|
script: 'jjwxc-rank-scraper.cjs',
|
|
204
|
-
extra: ['--type', '
|
|
205
|
+
extra: ['--type', '5,17', '--outdir', outDir],
|
|
205
206
|
};
|
|
206
207
|
case 'zhihu':
|
|
207
208
|
return {
|
|
@@ -59,12 +59,13 @@
|
|
|
59
59
|
|
|
60
60
|
| 榜单 | orderstr |
|
|
61
61
|
|------|----------|
|
|
62
|
+
| 月榜 | 5 |
|
|
63
|
+
| 总分榜 | 7 |
|
|
64
|
+
| 季度榜 | 4 |
|
|
62
65
|
| 收入金榜 | 12 |
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
| 新手金榜 | 15 |
|
|
67
|
-
| 千字金榜 | 17 |
|
|
66
|
+
| 完结金榜 | 16 |
|
|
67
|
+
| 勤奋指数榜 | 15 |
|
|
68
|
+
| 新手金榜 | 17 |
|
|
68
69
|
|
|
69
70
|
### 输出模板
|
|
70
71
|
|
|
@@ -27,12 +27,13 @@ const BASE_URL = "https://www.jjwxc.net/topten.php";
|
|
|
27
27
|
const DETAIL_BASE = "https://www.jjwxc.net/onebook.php";
|
|
28
28
|
|
|
29
29
|
const RANK_TYPES = [
|
|
30
|
+
{ id: "5", label: "月榜" },
|
|
31
|
+
{ id: "7", label: "总分榜" },
|
|
32
|
+
{ id: "4", label: "季度榜" },
|
|
30
33
|
{ id: "12", label: "收入金榜" },
|
|
31
|
-
{ id: "
|
|
32
|
-
{ id: "
|
|
33
|
-
{ id: "
|
|
34
|
-
{ id: "15", label: "新手金榜" },
|
|
35
|
-
{ id: "17", label: "千字金榜" },
|
|
34
|
+
{ id: "16", label: "完结金榜" },
|
|
35
|
+
{ id: "15", label: "勤奋指数榜" },
|
|
36
|
+
{ id: "17", label: "新手金榜" },
|
|
36
37
|
];
|
|
37
38
|
|
|
38
39
|
const DETAIL_CHUNK = 6;
|
|
@@ -294,13 +295,15 @@ const LIST_ONLY = args.includes("--list-only");
|
|
|
294
295
|
const LOGIN_WAIT = parseInt(getArg(args, "--login-wait") || "0", 10);
|
|
295
296
|
|
|
296
297
|
async function main() {
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
const rankTypeIds = (RANKTYPE || "12").split(",").map(t => t.trim());
|
|
299
|
+
const invalid = rankTypeIds.find(id => id !== "all" && !RANK_TYPES.some(r => r.id === id));
|
|
300
|
+
if (invalid) {
|
|
301
|
+
throw new Error(`未知 --type: ${invalid}`);
|
|
299
302
|
}
|
|
300
303
|
if (CHANNEL !== "0") {
|
|
301
304
|
throw new Error(`未知 --channel: ${CHANNEL}(当前仅支持 0=全站)`);
|
|
302
305
|
}
|
|
303
|
-
const rankTypes = RANKTYPE === "all" ? RANK_TYPES.map(r => r.id) :
|
|
306
|
+
const rankTypes = RANKTYPE === "all" ? RANK_TYPES.map(r => r.id) : rankTypeIds;
|
|
304
307
|
let written = 0, failed = 0, partial = false;
|
|
305
308
|
const partialReasons = [];
|
|
306
309
|
|