pixivflow 2.17.0 → 2.18.0
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/{README_EN.md → README.en.md} +8 -6
- package/README.md +8 -6
- package/config/examples/README.md +218 -0
- package/config/examples/multi-tag-or-limit.zh.json +49 -0
- package/config/examples/specific-download.example.json +173 -0
- package/config/examples/standalone.config.example.json +167 -0
- package/config/examples/standalone.config.novel-chinese.json +124 -0
- package/config/examples/standalone.config.ranking.json +135 -0
- package/config/examples/standalone.config.simple.json +52 -0
- package/config/examples/yesterday-popular-novel.zh.json +48 -0
- package/config/examples/yesterday-ranking-illustration.json +43 -0
- package/dist/commands/DiagnoseEgressCommand.d.ts +98 -0
- package/dist/commands/DiagnoseEgressCommand.d.ts.map +1 -0
- package/dist/commands/DiagnoseEgressCommand.js +327 -0
- package/dist/commands/DiagnoseEgressCommand.js.map +1 -0
- package/dist/commands/MaintainCommand.d.ts.map +1 -1
- package/dist/commands/MaintainCommand.js +10 -15
- package/dist/commands/MaintainCommand.js.map +1 -1
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/delivery/LegacyOutboxMigration.js +1 -1
- package/dist/delivery/LegacyOutboxMigration.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/puppeteer-login-adapter/auth-code.d.ts +1 -1
- package/dist/puppeteer-login-adapter/auth-code.d.ts.map +1 -1
- package/dist/puppeteer-login-adapter/browser-launch.d.ts +21 -0
- package/dist/puppeteer-login-adapter/browser-launch.d.ts.map +1 -0
- package/dist/puppeteer-login-adapter/browser-launch.js +46 -0
- package/dist/puppeteer-login-adapter/browser-launch.js.map +1 -0
- package/dist/puppeteer-login-adapter/environment.js +2 -2
- package/dist/puppeteer-login-adapter/environment.js.map +1 -1
- package/dist/puppeteer-login-adapter/login-headless.d.ts.map +1 -1
- package/dist/puppeteer-login-adapter/login-headless.js +2 -5
- package/dist/puppeteer-login-adapter/login-headless.js.map +1 -1
- package/dist/puppeteer-login-adapter/login-interactive.d.ts.map +1 -1
- package/dist/puppeteer-login-adapter/login-interactive.js +2 -5
- package/dist/puppeteer-login-adapter/login-interactive.js.map +1 -1
- package/dist/storage/Database.d.ts +2 -0
- package/dist/storage/Database.d.ts.map +1 -1
- package/dist/storage/Database.js +7 -6
- package/dist/storage/Database.js.map +1 -1
- package/dist/storage/DatabaseMigration.d.ts +2 -2
- package/dist/storage/DatabaseMigration.d.ts.map +1 -1
- package/dist/storage/DatabaseMigration.js.map +1 -1
- package/dist/storage/drivers/NodeSqliteDriver.d.ts +14 -0
- package/dist/storage/drivers/NodeSqliteDriver.d.ts.map +1 -0
- package/dist/storage/drivers/NodeSqliteDriver.js +123 -0
- package/dist/storage/drivers/NodeSqliteDriver.js.map +1 -0
- package/dist/storage/drivers/SqliteDriver.d.ts +55 -0
- package/dist/storage/drivers/SqliteDriver.d.ts.map +1 -0
- package/dist/storage/drivers/SqliteDriver.js +21 -0
- package/dist/storage/drivers/SqliteDriver.js.map +1 -0
- package/dist/storage/repositories/BaseRepository.d.ts +4 -4
- package/dist/storage/repositories/BaseRepository.d.ts.map +1 -1
- package/dist/storage/repositories/BaseRepository.js.map +1 -1
- package/dist/storage/repositories/DownloadRepository.d.ts +2 -1
- package/dist/storage/repositories/DownloadRepository.d.ts.map +1 -1
- package/dist/storage/repositories/DownloadRepository.js.map +1 -1
- package/dist/storage/repositories/RateLimitStateRepository.d.ts +1 -1
- package/dist/storage/repositories/RateLimitStateRepository.js +1 -1
- package/dist/version.js +1 -1
- package/dist/webui/package.json +1 -1
- package/node_modules/@redtidev/pixiv-client/README.en.md +105 -0
- package/node_modules/@redtidev/pixiv-client/README.md +67 -73
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.d.ts +1 -1
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.js +1 -1
- package/node_modules/@redtidev/pixiv-client/src/rate-limit/RateLimitGate.ts +1 -1
- package/package.json +7 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PixivFlow
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Language / 语言:** [中文](README.md) · English
|
|
4
4
|
|
|
5
5
|
Pixiv batch download and scheduled collection tool. Bulk-download
|
|
6
6
|
illustrations and novels, search by tag, filter by bookmarks and dates,
|
|
@@ -8,13 +8,13 @@ and run recurring collection jobs on a schedule. CLI and WebUI included.
|
|
|
8
8
|
Built with TypeScript and Node.js; runs on Windows, macOS, Linux and Docker.
|
|
9
9
|
|
|
10
10
|
[](https://www.npmjs.com/package/pixivflow)
|
|
11
|
-
[](https://nodejs.org/)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://redtidev1918.github.io/PixivFlow/)
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
-
Requires Node.js 22.
|
|
17
|
+
Requires Node.js 22.13 or later; use a currently supported LTS release in production.
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm install -g pixivflow
|
|
@@ -157,7 +157,7 @@ Interactive configuration wizard: `pixivflow setup`.
|
|
|
157
157
|
|
|
158
158
|
`tags discover` calls the Pixiv autocomplete endpoint and samples recent illustrations/novels to count co-occurring tags, caching results for 7 days; it **never** changes active plans. After reviewing candidates, run `tags apply` to explicitly select tags: it validates the whole config, writes a backup and atomically replaces the file so a running scheduler hot-reloads it.
|
|
159
159
|
|
|
160
|
-
More commands in [
|
|
160
|
+
More commands in [USAGE.md](docs/USAGE.md); see the [migration guide](docs/MIGRATION.md) for upgrading from v1 to v2.
|
|
161
161
|
|
|
162
162
|
## Documentation
|
|
163
163
|
|
|
@@ -165,14 +165,16 @@ Full tutorial site: <https://redtidev1918.github.io/PixivFlow/>
|
|
|
165
165
|
|
|
166
166
|
| Document | Description |
|
|
167
167
|
| --- | --- |
|
|
168
|
+
| [📥 Download](docs/download.md) | Prebuilt packages, npm and Docker |
|
|
168
169
|
| [QUICKSTART](docs/QUICKSTART.md) | Get running in three minutes |
|
|
169
170
|
| [CONFIG](docs/CONFIG.md) | All configuration options |
|
|
170
171
|
| [USAGE](docs/USAGE.md) | Feature reference |
|
|
171
172
|
| [LOGIN](docs/LOGIN.md) | Account sign-in details |
|
|
172
173
|
| [DOCKER](docs/DOCKER.md) | Container deployment |
|
|
173
174
|
| [ARCHITECTURE](docs/ARCHITECTURE.md) | Architecture notes |
|
|
175
|
+
| [MIGRATION](docs/MIGRATION.md) | Upgrade from v1 to v2 |
|
|
174
176
|
| [RELEASING](docs/RELEASING.md) | npm release workflow |
|
|
175
|
-
| [CHANGELOG](
|
|
177
|
+
| [CHANGELOG](CHANGELOG.md) | Version history |
|
|
176
178
|
| [ACKNOWLEDGMENTS](docs/ACKNOWLEDGMENTS.md) | Credits and references |
|
|
177
179
|
|
|
178
180
|
Chinese version: [README.md](README.md).
|
|
@@ -183,7 +185,7 @@ Bugs and feature requests go to
|
|
|
183
185
|
[Issues](https://github.com/redtidev1918/PixivFlow/issues); please run
|
|
184
186
|
`pixivflow health` first and include its output (strip tokens and other
|
|
185
187
|
secrets before sharing). Security issues are handled privately — see
|
|
186
|
-
[SECURITY.md](SECURITY.md).
|
|
188
|
+
[SECURITY.en.md](SECURITY.en.md).
|
|
187
189
|
|
|
188
190
|
## Acknowledgments
|
|
189
191
|
|
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# PixivFlow
|
|
2
2
|
|
|
3
|
-
[English](
|
|
3
|
+
**语言 / Language:** 中文 · [English](README.en.md)
|
|
4
4
|
|
|
5
5
|
Pixiv 批量下载与定时收集工具。支持插画和小说的批量下载、标签搜索、
|
|
6
6
|
多维度筛选和 Cron 定时任务,提供命令行与 WebUI 两种使用方式。
|
|
7
7
|
基于 TypeScript 和 Node.js,可在 Windows、macOS、Linux 及 Docker 中运行。
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/pixivflow)
|
|
10
|
-
[](https://nodejs.org/)
|
|
11
11
|
[](LICENSE)
|
|
12
12
|
[](https://redtidev1918.github.io/PixivFlow/)
|
|
13
13
|
|
|
14
14
|
## 安装
|
|
15
15
|
|
|
16
|
-
需要 Node.js 22.
|
|
16
|
+
需要 Node.js 22.13 或更高版本;生产环境请使用仍受支持的 LTS。
|
|
17
17
|
下载 Pixiv 动图(ugoira)还需要 `python3` 和 `ffmpeg`:程序按逐帧延迟合成循环 GIF,
|
|
18
18
|
可直接交给 TelePost 作为动画发送。官方 Docker 镜像已包含两者,详见 [配置说明](docs/CONFIG.md#pixiv-动图ugoira)。
|
|
19
19
|
|
|
@@ -207,7 +207,7 @@ Email、Telegram、Discord、ntfy 等渠道;PixivFlow 不实现这些通知协
|
|
|
207
207
|
|
|
208
208
|
`tags discover` 会调用 Pixiv 标签联想接口,并抽样最近插画 / 小说统计共同出现的标签,结果缓存 7 天;它**不会**改动任何下载计划。确认候选后用 `tags apply` 显式选择,应用前会整份校验配置、自动备份并原子替换,运行中的 scheduler 经配置热重载生效。
|
|
209
209
|
|
|
210
|
-
其他用法见 [
|
|
210
|
+
其他用法见 [USAGE.md](docs/USAGE.md);从 v1 升级到 v2 见 [迁移指南](docs/MIGRATION.md)。
|
|
211
211
|
|
|
212
212
|
## 文档
|
|
213
213
|
|
|
@@ -215,17 +215,19 @@ Email、Telegram、Discord、ntfy 等渠道;PixivFlow 不实现这些通知协
|
|
|
215
215
|
|
|
216
216
|
| 文档 | 说明 |
|
|
217
217
|
| --- | --- |
|
|
218
|
+
| [📥 下载](docs/download.md) | 各平台安装包、npm 与 Docker 获取方式 |
|
|
218
219
|
| [QUICKSTART](docs/QUICKSTART.md) | 三分钟上手 |
|
|
219
220
|
| [CONFIG](docs/CONFIG.md) | 全部配置项说明 |
|
|
220
221
|
| [USAGE](docs/USAGE.md) | 功能详解 |
|
|
221
222
|
| [LOGIN](docs/LOGIN.md) | 账号登录相关 |
|
|
222
223
|
| [DOCKER](docs/DOCKER.md) | 容器化部署方案 |
|
|
223
224
|
| [ARCHITECTURE](docs/ARCHITECTURE.md) | 架构与技术实现 |
|
|
225
|
+
| [MIGRATION](docs/MIGRATION.md) | 从 v1 升级到 v2 |
|
|
224
226
|
| [RELEASING](docs/RELEASING.md) | npm 发版流程 |
|
|
225
|
-
| [CHANGELOG](
|
|
227
|
+
| [CHANGELOG](CHANGELOG.md) | 版本更新日志 |
|
|
226
228
|
| [ACKNOWLEDGMENTS](docs/ACKNOWLEDGMENTS.md) | 参考与致谢:灵感来源、核心依赖与规范声明 |
|
|
227
229
|
|
|
228
|
-
English version: [
|
|
230
|
+
English version: [README.en.md](README.en.md).
|
|
229
231
|
|
|
230
232
|
## 问题反馈
|
|
231
233
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# 示例配置文件说明
|
|
2
|
+
|
|
3
|
+
本目录包含 PixivFlow 的各种配置文件示例。根据你的需求选择合适的配置文件。
|
|
4
|
+
|
|
5
|
+
## 📁 配置文件列表
|
|
6
|
+
|
|
7
|
+
### 1. `standalone.config.example.json` - 完整配置示例
|
|
8
|
+
**推荐用于:** 需要了解所有配置选项的详细说明
|
|
9
|
+
|
|
10
|
+
- ✅ 包含所有可用配置选项
|
|
11
|
+
- ✅ 每个选项都有详细的中文注释说明
|
|
12
|
+
- ✅ 包含多个实际使用示例
|
|
13
|
+
- ✅ 适合学习和参考
|
|
14
|
+
|
|
15
|
+
**使用方法:**
|
|
16
|
+
```bash
|
|
17
|
+
cp config/examples/standalone.config.example.json config/standalone.config.json
|
|
18
|
+
# 然后修改 refreshToken
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### 2. `standalone.config.simple.json` - 简化快速开始 ⭐
|
|
24
|
+
**推荐用于:** 快速开始使用,不需要复杂配置
|
|
25
|
+
|
|
26
|
+
- ✅ 配置简洁明了
|
|
27
|
+
- ✅ 只包含最常用的选项
|
|
28
|
+
- ✅ 适合新手快速上手
|
|
29
|
+
- ✅ 包含一个基础的下载示例
|
|
30
|
+
|
|
31
|
+
**使用方法:**
|
|
32
|
+
```bash
|
|
33
|
+
cp config/examples/standalone.config.simple.json config/standalone.config.json
|
|
34
|
+
# 运行 pixivflow login 获取 refreshToken
|
|
35
|
+
# 修改配置文件中的 refreshToken
|
|
36
|
+
# 根据需要修改 targets 中的标签
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 3. `standalone.config.ranking.json` - 排行榜下载示例
|
|
42
|
+
**推荐用于:** 主要下载排行榜作品
|
|
43
|
+
|
|
44
|
+
- ✅ 包含各种排行榜模式的示例
|
|
45
|
+
- ✅ 日榜、周榜、月榜配置示例
|
|
46
|
+
- ✅ 男性向、女性向、AI作品排行榜示例
|
|
47
|
+
- ✅ 排行榜筛选标签的配置方法
|
|
48
|
+
|
|
49
|
+
**使用方法:**
|
|
50
|
+
```bash
|
|
51
|
+
cp config/examples/standalone.config.ranking.json config/standalone.config.json
|
|
52
|
+
# 修改 refreshToken
|
|
53
|
+
# 根据需要修改 targets 数组
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**支持的排行榜类型:**
|
|
57
|
+
- `day` - 日榜
|
|
58
|
+
- `week` - 周榜
|
|
59
|
+
- `month` - 月榜
|
|
60
|
+
- `day_male` - 男性向日榜
|
|
61
|
+
- `day_female` - 女性向日榜
|
|
62
|
+
- `day_ai` - AI作品日榜
|
|
63
|
+
- `week_original` - 原创周榜
|
|
64
|
+
- `week_rookie` - 新人周榜
|
|
65
|
+
- `day_r18` - R18日榜
|
|
66
|
+
- `day_male_r18` - 男性向R18日榜
|
|
67
|
+
- `day_female_r18` - 女性向R18日榜
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### 4. `specific-download.example.json` - 特定下载任务示例
|
|
72
|
+
**推荐用于:** 需要实现特定下载场景
|
|
73
|
+
|
|
74
|
+
- ✅ 包含10个实际使用场景的配置示例
|
|
75
|
+
- ✅ 随机下载、质量过滤、时间范围等场景
|
|
76
|
+
- ✅ 小说系列下载、单作品下载示例
|
|
77
|
+
- ✅ 语言过滤、多标签OR关系等高级用法
|
|
78
|
+
|
|
79
|
+
**使用方法:**
|
|
80
|
+
```bash
|
|
81
|
+
cp config/examples/specific-download.example.json config/standalone.config.json
|
|
82
|
+
# 修改 refreshToken
|
|
83
|
+
# 根据需要选择或修改 targets 中的场景
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**包含的场景:**
|
|
87
|
+
1. 随机下载 - 测试或获取随机作品
|
|
88
|
+
2. 排行榜筛选 - 从排行榜中筛选特定标签
|
|
89
|
+
3. 质量过滤 - 只下载高收藏数作品
|
|
90
|
+
4. 时间范围 - 下载指定时间段的作品
|
|
91
|
+
5. 多标签OR - 包含任意一个标签即可
|
|
92
|
+
6. 系列下载 - 下载整个小说系列
|
|
93
|
+
7. 单作品下载 - 下载指定ID的小说
|
|
94
|
+
8. 语言过滤 - 只下载中文小说
|
|
95
|
+
9. 特殊排行榜 - 原创周榜
|
|
96
|
+
10. 特殊排行榜 - 新人周榜
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### 5. `standalone.config.novel-chinese.json` - 中文小说下载示例
|
|
101
|
+
**推荐用于:** 主要下载中文小说
|
|
102
|
+
|
|
103
|
+
- ✅ 包含中文小说下载的各种配置示例
|
|
104
|
+
- ✅ 语言过滤配置(仅中文、非中文、不过滤)
|
|
105
|
+
- ✅ 时间范围过滤示例
|
|
106
|
+
- ✅ 按热门程度或日期排序
|
|
107
|
+
|
|
108
|
+
**使用方法:**
|
|
109
|
+
```bash
|
|
110
|
+
cp config/examples/standalone.config.novel-chinese.json config/standalone.config.json
|
|
111
|
+
# 修改 refreshToken
|
|
112
|
+
# 根据需要修改 targets 数组中的标签
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**语言过滤选项:**
|
|
116
|
+
- `chinese` - 仅下载中文小说
|
|
117
|
+
- `non-chinese` - 仅下载非中文小说(日语、英语等)
|
|
118
|
+
- `null` 或不设置 - 下载所有语言的小说
|
|
119
|
+
|
|
120
|
+
**时间范围占位符:**
|
|
121
|
+
- `LAST_7_DAYS` - 最近7天(程序自动计算日期)
|
|
122
|
+
- `YESTERDAY` - 昨天
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🚀 快速使用示例
|
|
127
|
+
|
|
128
|
+
以下示例文件可以直接使用,无需复制到根目录:
|
|
129
|
+
|
|
130
|
+
### `yesterday-popular-novel.zh.json` - 昨日热门中文小说
|
|
131
|
+
**功能:** 下载昨日热门中文小说 Top 10
|
|
132
|
+
|
|
133
|
+
- 搜索模式 + `popular_desc` 排序 + `YESTERDAY` 日期
|
|
134
|
+
- 标签:`オリジナル`(通用原创标签)
|
|
135
|
+
- 语言过滤:仅中文
|
|
136
|
+
|
|
137
|
+
**使用方法:**
|
|
138
|
+
```bash
|
|
139
|
+
# 方式 1:命令行参数
|
|
140
|
+
pixivflow download --config "$(pwd)/config/examples/yesterday-popular-novel.zh.json"
|
|
141
|
+
|
|
142
|
+
# 方式 2:环境变量
|
|
143
|
+
export PIXIV_DOWNLOADER_CONFIG="$(pwd)/config/examples/yesterday-popular-novel.zh.json"
|
|
144
|
+
pixivflow download
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### `yesterday-ranking-illustration.json` - 昨日日榜插画
|
|
150
|
+
**功能:** 下载昨日日榜插画 Top 10
|
|
151
|
+
|
|
152
|
+
- 排行榜模式
|
|
153
|
+
- 不依赖标签,直接按 Pixiv 日榜抓取
|
|
154
|
+
|
|
155
|
+
**使用方法:**
|
|
156
|
+
```bash
|
|
157
|
+
pixivflow download --config "$(pwd)/config/examples/yesterday-ranking-illustration.json"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### `multi-tag-or-limit.zh.json` - 多标签并集 + 中文过滤
|
|
163
|
+
**功能:** 多标签并集(任意一个标签即可)+ 总量限制 10 + 中文过滤 + 昨天
|
|
164
|
+
|
|
165
|
+
- 标签:`風景 イラスト オリジナル`(通用常见标签)
|
|
166
|
+
- `tagRelation: "or"` - 任意一个标签命中即可
|
|
167
|
+
- 语言过滤:仅中文
|
|
168
|
+
- 日期:昨天
|
|
169
|
+
|
|
170
|
+
**使用方法:**
|
|
171
|
+
```bash
|
|
172
|
+
pixivflow download --config "$(pwd)/config/examples/multi-tag-or-limit.zh.json"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 💡 使用提示
|
|
178
|
+
|
|
179
|
+
### 直接使用示例文件
|
|
180
|
+
|
|
181
|
+
所有示例文件都可以直接使用,无需复制:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# 使用命令行参数
|
|
185
|
+
pixivflow download --config "$(pwd)/config/examples/yesterday-popular-novel.zh.json"
|
|
186
|
+
|
|
187
|
+
# 或使用环境变量(对所有命令生效)
|
|
188
|
+
export PIXIV_DOWNLOADER_CONFIG="$(pwd)/config/examples/yesterday-popular-novel.zh.json"
|
|
189
|
+
pixivflow download
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 登录并写入配置
|
|
193
|
+
|
|
194
|
+
如果示例文件中的 `YOUR_REFRESH_TOKEN` 还未替换,可以运行:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# 登录并自动写入 refresh token 到指定配置文件
|
|
198
|
+
pixivflow login --config "$(pwd)/config/examples/yesterday-popular-novel.zh.json"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
该命令会把登录获取的 refresh token 自动写入对应配置文件。
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## ⚠️ 注意事项
|
|
206
|
+
|
|
207
|
+
1. **所有示例文件中的 `YOUR_REFRESH_TOKEN` 都需要替换为实际值**
|
|
208
|
+
2. **或使用 `pixivflow login --config <配置文件路径>` 自动填充**
|
|
209
|
+
3. **配置文件使用 JSON 格式,注意语法正确性**
|
|
210
|
+
4. **修改配置后建议先测试少量下载,确认配置正确**
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 📚 更多信息
|
|
215
|
+
|
|
216
|
+
- 配置文件说明:查看 [../README.md](../README.md)
|
|
217
|
+
- 详细配置说明:查看 `docs/CONFIG.md`
|
|
218
|
+
- 项目文档:查看 `docs/` 目录
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"logLevel": "info",
|
|
3
|
+
"pixiv": {
|
|
4
|
+
"clientId": "MOBrBDS8blbauoSck0ZfDbtuzpyT",
|
|
5
|
+
"clientSecret": "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj",
|
|
6
|
+
"deviceToken": "pixiv",
|
|
7
|
+
"refreshToken": "YOUR_REFRESH_TOKEN",
|
|
8
|
+
"userAgent": "PixivAndroidApp/5.0.234 (Android 11; Pixel 6)"
|
|
9
|
+
},
|
|
10
|
+
"network": {
|
|
11
|
+
"timeoutMs": 30000,
|
|
12
|
+
"retries": 3,
|
|
13
|
+
"retryDelay": 1000
|
|
14
|
+
},
|
|
15
|
+
"storage": {
|
|
16
|
+
"databasePath": "./data/pixiv-downloader.db",
|
|
17
|
+
"downloadDirectory": "./downloads"
|
|
18
|
+
},
|
|
19
|
+
"scheduler": {
|
|
20
|
+
"enabled": false,
|
|
21
|
+
"cron": "0 3 * * *",
|
|
22
|
+
"timezone": "Asia/Shanghai"
|
|
23
|
+
},
|
|
24
|
+
"download": {
|
|
25
|
+
"concurrency": 3,
|
|
26
|
+
"requestDelay": 500,
|
|
27
|
+
"dynamicConcurrency": true,
|
|
28
|
+
"minConcurrency": 1,
|
|
29
|
+
"maxRetries": 3,
|
|
30
|
+
"retryDelay": 2000,
|
|
31
|
+
"timeout": 60000
|
|
32
|
+
},
|
|
33
|
+
"targets": [
|
|
34
|
+
{
|
|
35
|
+
"type": "novel",
|
|
36
|
+
"mode": "search",
|
|
37
|
+
"tag": "風景 イラスト オリジナル",
|
|
38
|
+
"tagRelation": "or",
|
|
39
|
+
"searchTarget": "partial_match_for_tags",
|
|
40
|
+
"sort": "popular_desc",
|
|
41
|
+
"limit": 10,
|
|
42
|
+
"startDate": "YESTERDAY",
|
|
43
|
+
"endDate": "YESTERDAY",
|
|
44
|
+
"languageFilter": "chinese",
|
|
45
|
+
"detectLanguage": true
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"initialDelay": 0
|
|
49
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "PixivFlow 特定下载任务配置示例",
|
|
3
|
+
"_note": "此配置文件展示了各种实际使用场景的配置方法",
|
|
4
|
+
"_usage": "使用方法:",
|
|
5
|
+
"_usage1": " 1. 复制此文件: cp config/specific-download.example.json config/standalone.config.json",
|
|
6
|
+
"_usage2": " 2. 修改 refreshToken(如果还没有登录,先运行: pixivflow login)",
|
|
7
|
+
"_usage3": " 3. 根据需要修改 targets 数组中的配置",
|
|
8
|
+
"_usage4": " 4. 运行下载: pixivflow download",
|
|
9
|
+
"_principle": "核心理念:所有任务都通过配置文件实现,无需修改源代码!",
|
|
10
|
+
|
|
11
|
+
"logLevel": "info",
|
|
12
|
+
"pixiv": {
|
|
13
|
+
"clientId": "MOBrBDS8blbauoSck0ZfDbtuzpyT",
|
|
14
|
+
"clientSecret": "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj",
|
|
15
|
+
"deviceToken": "pixiv",
|
|
16
|
+
"refreshToken": "YOUR_REFRESH_TOKEN",
|
|
17
|
+
"userAgent": "PixivAndroidApp/5.0.234 (Android 11; Pixel 6)"
|
|
18
|
+
},
|
|
19
|
+
"network": {
|
|
20
|
+
"timeoutMs": 30000,
|
|
21
|
+
"retries": 3,
|
|
22
|
+
"retryDelay": 1000,
|
|
23
|
+
"proxy": {
|
|
24
|
+
"enabled": false,
|
|
25
|
+
"host": "127.0.0.1",
|
|
26
|
+
"port": 7890,
|
|
27
|
+
"protocol": "http",
|
|
28
|
+
"username": "",
|
|
29
|
+
"password": ""
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"storage": {
|
|
33
|
+
"databasePath": "./data/pixiv-downloader.db",
|
|
34
|
+
"downloadDirectory": "./downloads",
|
|
35
|
+
"illustrationDirectory": "./downloads/illustrations",
|
|
36
|
+
"novelDirectory": "./downloads/novels",
|
|
37
|
+
"illustrationOrganization": "byDownloadDate",
|
|
38
|
+
"novelOrganization": "byDownloadDate"
|
|
39
|
+
},
|
|
40
|
+
"scheduler": {
|
|
41
|
+
"enabled": false
|
|
42
|
+
},
|
|
43
|
+
"download": {
|
|
44
|
+
"concurrency": 3,
|
|
45
|
+
"requestDelay": 500,
|
|
46
|
+
"dynamicConcurrency": true,
|
|
47
|
+
"minConcurrency": 1,
|
|
48
|
+
"maxRetries": 3,
|
|
49
|
+
"retryDelay": 2000,
|
|
50
|
+
"timeout": 60000
|
|
51
|
+
},
|
|
52
|
+
"targets": [
|
|
53
|
+
{
|
|
54
|
+
"_comment": "场景1: 下载一张随机的原神图片",
|
|
55
|
+
"type": "illustration",
|
|
56
|
+
"tag": "原神",
|
|
57
|
+
"limit": 1,
|
|
58
|
+
"searchTarget": "partial_match_for_tags",
|
|
59
|
+
"restrict": "public",
|
|
60
|
+
"mode": "search",
|
|
61
|
+
"random": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"_comment": "场景2: 下载昨天排名最高的明日方舟相关作品",
|
|
65
|
+
"type": "illustration",
|
|
66
|
+
"tag": "アークナイツ",
|
|
67
|
+
"limit": 10,
|
|
68
|
+
"mode": "ranking",
|
|
69
|
+
"rankingMode": "day",
|
|
70
|
+
"rankingDate": "YESTERDAY",
|
|
71
|
+
"filterTag": "アークナイツ"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"_comment": "场景3: 下载收藏数超过500的風景插画,按热门程度排序",
|
|
75
|
+
"type": "illustration",
|
|
76
|
+
"tag": "風景",
|
|
77
|
+
"limit": 30,
|
|
78
|
+
"searchTarget": "partial_match_for_tags",
|
|
79
|
+
"sort": "popular_desc",
|
|
80
|
+
"minBookmarks": 500,
|
|
81
|
+
"mode": "search"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"_comment": "场景4: 下载2024年1月发布的原神插画",
|
|
85
|
+
"type": "illustration",
|
|
86
|
+
"tag": "原神",
|
|
87
|
+
"limit": 50,
|
|
88
|
+
"searchTarget": "partial_match_for_tags",
|
|
89
|
+
"mode": "search",
|
|
90
|
+
"startDate": "2024-01-01",
|
|
91
|
+
"endDate": "2024-01-31"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"_comment": "场景5: 下载包含'原神'或'Genshin'标签的插画(OR关系)",
|
|
95
|
+
"type": "illustration",
|
|
96
|
+
"tag": "原神 Genshin",
|
|
97
|
+
"tagRelation": "or",
|
|
98
|
+
"limit": 20,
|
|
99
|
+
"searchTarget": "partial_match_for_tags",
|
|
100
|
+
"mode": "search"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"_comment": "场景6: 下载指定小说系列的所有作品",
|
|
104
|
+
"type": "novel",
|
|
105
|
+
"tag": "series",
|
|
106
|
+
"seriesId": 14690617,
|
|
107
|
+
"_seriesId_note": "从URL https://www.pixiv.net/novel/series/14690617 中获取系列ID",
|
|
108
|
+
"limit": null
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"_comment": "场景7: 下载单个小说",
|
|
112
|
+
"type": "novel",
|
|
113
|
+
"tag": "single",
|
|
114
|
+
"novelId": 26132156,
|
|
115
|
+
"_novelId_note": "从URL https://www.pixiv.net/novel/show.php?id=26132156 中获取小说ID"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"_comment": "场景8: 下载中文小说",
|
|
119
|
+
"type": "novel",
|
|
120
|
+
"tag": "オリジナル",
|
|
121
|
+
"limit": 20,
|
|
122
|
+
"searchTarget": "partial_match_for_tags",
|
|
123
|
+
"mode": "search",
|
|
124
|
+
"languageFilter": "chinese",
|
|
125
|
+
"detectLanguage": true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"_comment": "场景9: 下载本周原创周榜前50名",
|
|
129
|
+
"type": "illustration",
|
|
130
|
+
"tag": "week-original",
|
|
131
|
+
"limit": 50,
|
|
132
|
+
"mode": "ranking",
|
|
133
|
+
"rankingMode": "week_original"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"_comment": "场景10: 下载新人周榜前30名",
|
|
137
|
+
"type": "illustration",
|
|
138
|
+
"tag": "week-rookie",
|
|
139
|
+
"limit": 30,
|
|
140
|
+
"mode": "ranking",
|
|
141
|
+
"rankingMode": "week_rookie"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"_comment": "场景11: 下载单个插画",
|
|
145
|
+
"type": "illustration",
|
|
146
|
+
"tag": "single",
|
|
147
|
+
"illustId": 12345678,
|
|
148
|
+
"_illustId_note": "从URL https://www.pixiv.net/artworks/12345678 中获取插画ID"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"_comment": "场景12: 下载用户的所有作品",
|
|
152
|
+
"type": "illustration",
|
|
153
|
+
"tag": "user",
|
|
154
|
+
"userId": "123456",
|
|
155
|
+
"limit": 100,
|
|
156
|
+
"_userId_note": "从URL https://www.pixiv.net/users/123456 中获取用户ID,下载该用户的所有插画(最多100个)"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"_场景说明": {
|
|
160
|
+
"场景1": "随机下载 - 适合测试或获取随机作品",
|
|
161
|
+
"场景2": "排行榜筛选 - 从排行榜中筛选特定标签",
|
|
162
|
+
"场景3": "质量过滤 - 只下载高收藏数作品",
|
|
163
|
+
"场景4": "时间范围 - 下载指定时间段的作品",
|
|
164
|
+
"场景5": "多标签OR - 包含任意一个标签即可",
|
|
165
|
+
"场景6": "系列下载 - 下载整个小说系列",
|
|
166
|
+
"场景7": "单作品下载 - 下载指定ID的小说",
|
|
167
|
+
"场景8": "语言过滤 - 只下载中文小说",
|
|
168
|
+
"场景9": "特殊排行榜 - 原创周榜",
|
|
169
|
+
"场景10": "特殊排行榜 - 新人周榜",
|
|
170
|
+
"场景11": "单插画下载 - 下载指定ID的插画",
|
|
171
|
+
"场景12": "用户作品下载 - 下载指定用户的所有作品"
|
|
172
|
+
}
|
|
173
|
+
}
|