11## Changes
22
3- ![ Downloads] ( https://img.shields.io/github/downloads/Ljzd-PRO/KToolBox/v0.16 .0/total )
3+ ![ Downloads] ( https://img.shields.io/github/downloads/Ljzd-PRO/KToolBox/v0.17 .0/total )
44
55### 💡 Feature
66
7- - Add auto-managed cookies to bypass ** DDoS Guard** - #269 (@CanglanXYA )
8- - Add comprehensive ** revision post** support with enhanced API and configuration - #240 , #241
9- - For posts like: ` https://kemono.cr/{service}/user/{user_id}/post/{post_id}/revision/{revision_id} `
10- - This feature is disabled by default
11- - Run ` ktoolbox config-editor ` to edit this configurations (` Job -> include_revisions ` )
12- - Or manually edit it in ` .env ` file or environment variables
7+ - Support download ** images embedded in post HTML content** - #218
8+ - Add external links extraction feature for ** cloud storage URLs** - #232 (@xxkzn )
9+ - New configurations:
10+ - ` job.extract_external_links ` : Whether to extract external file sharing links from post content and save to separate file
11+ - ` job.external_link_patterns ` : Regex patterns for extracting external links
12+ - These configuration are ** optional** , with the feature enabled by default. The regular expression includes the following services:
13+ - Google Drive
14+ - MEGA
15+ - Dropbox
16+ - OneDrive
17+ - MediaFire
18+ - And other common file hosting services
19+ - Run ` ktoolbox config-editor ` to edit these configurations (` Job -> extract_external_links ` , ` Job -> external_link_patterns ` )
20+ - Or manually edit them ` .env ` file or environment variables
1321 ``` dotenv
14- # Set this to `True` to enable revisions download
15- KTOOLBOX_JOB__INCLUDE_REVISIONS=True
22+ # This feature is enabled by default
23+ KTOOLBOX_JOB__EXTRACT_EXTERNAL_LINKS=True
24+ # Setting up lists and regular expressions in dotenv is relatively complex and cumbersome. It is recommended to use the aforementioned graphical configuration editor for these settings.
25+ KTOOLBOX_JOB__EXTERNAL_LINK_PATTERNS='["https?://drive\\.google\\.com/[^\\s]+", "https?://docs\\.google\\.com/[^\\s]+", "https?://mega\\.nz/[^\\s]+", "https?://mega\\.co\\.nz/[^\\s]+", "https?://(?:www\\.)?dropbox\\.com/[^\\s]+", "https?://db\\.tt/[^\\s]+", "https?://onedrive\\.live\\.com/[^\\s]+", "https?://1drv\\.ms/[^\\s]+", "https?://(?:www\\.)?mediafire\\.com/[^\\s]+", "https?://(?:www\\.)?wetransfer\\.com/[^\\s]+", "https?://we\\.tl/[^\\s]+", "https?://(?:www\\.)?sendspace\\.com/[^\\s]+", "https?://(?:www\\.)?4shared\\.com/[^\\s]+", "https?://(?:www\\.)?zippyshare\\.com/[^\\s]+", "https?://(?:www\\.)?uploadfiles\\.io/[^\\s]+", "https?://(?:www\\.)?box\\.com/[^\\s]+", "https?://(?:www\\.)?pcloud\\.com/[^\\s]+", "https?://disk\\.yandex\\.[a-z]+/[^\\s]+", "https?://[^\\s]*(?:file|upload|share|download|drive|storage)[^\\s]*\\.[a-z]{2,4}/[^\\s]+"]'
1626 ```
27+ - 📖More information: [Configuration-Reference-JobConfiguration](https://ktoolbox.readthedocs.io/latest/configuration/reference/#ktoolbox.configuration.JobConfiguration)
1728
18- [//]: # (### 🪲 Fix)
29+ ### 🪲 Fix
30+
31+ - Removed the deprecated configuration `job.post_structure.content_filepath`, use `job.post_structure.content` instead
32+ - Fixed an issue where the `sync-creator` command lacked handling for 404 responses when fetching post revisions
33+ (i\.e\. no revision version exists), which caused **slow task creation** - #294
34+ - Fixed the issue of **duplicate Cookies** in DDoS Guard management (manual management is no longer performed)
1935
2036- - -
2137
2238### 💡 新特性
2339
24- - 新增自动管理 Cookie 功能以绕过 **DDoS Guard** - #269 (@CanglanXYA)
25- - 新增全面的**修订作品**支持,增强 API 和配置功能 - #240, #241
26- - 适用于如下作品:`https://kemono.cr/{service}/user/{user_id}/post/{post_id}/revision/{revision_id}`
27- - 此功能默认关闭
28- - 运行 `ktoolbox config-editor` 可编辑此配置项(`Job -> include_revisions`)
29- - 或在 `.env` 文件或环境变量中手动编辑
40+ - 支持下载**帖子 HTML 内容中嵌入的图片** - #218
41+ - 新增**云存储 URL 外链提取**功能 - #232 (@xxkzn)
42+ - 新增配置项:
43+ - `job.extract_external_links`:是否从帖子内容中提取外部文件分享链接并保存到单独文件
44+ - `job.external_link_patterns`:用于提取外链的正则表达式模式
45+ - 这些配置项为**可选**,该功能默认启用。正则表达式已包含以下服务:
46+ - Google Drive
47+ - MEGA
48+ - Dropbox
49+ - OneDrive
50+ - MediaFire
51+ - 及其他常见文件托管服务
52+ - 可运行 `ktoolbox config-editor` 编辑这些配置(`Job -> extract_external_links`,`Job -> external_link_patterns`)
53+ - 或手动编辑 `.env` 文件或环境变量
3054 ```dotenv
31- # 设置为 `True` 以启用修订下载
32- KTOOLBOX_JOB__INCLUDE_REVISIONS=True
55+ # 此功能默认启用
56+ KTOOLBOX_JOB__EXTRACT_EXTERNAL_LINKS=True
57+ # 在 dotenv 中设置列表和正则表达式较为复杂,推荐使用上述图形化配置编辑器进行设置。
58+ KTOOLBOX_JOB__EXTERNAL_LINK_PATTERNS='["https?://drive\\.google\\.com/[^\\s]+", "https?://docs\\.google\\.com/[^\\s]+", "https?://mega\\.nz/[^\\s]+", "https?://mega\\.co\\.nz/[^\\s]+", "https?://(?:www\\.)?dropbox\\.com/[^\\s]+", "https?://db\\.tt/[^\\s]+", "https?://onedrive\\.live\\.com/[^\\s]+", "https?://1drv\\.ms/[^\\s]+", "https?://(?:www\\.)?mediafire\\.com/[^\\s]+", "https?://(?:www\\.)?wetransfer\\.com/[^\\s]+", "https?://we\\.tl/[^\\s]+", "https?://(?:www\\.)?sendspace\\.com/[^\\s]+", "https?://(?:www\\.)?4shared\\.com/[^\\s]+", "https?://(?:www\\.)?zippyshare\\.com/[^\\s]+", "https?://(?:www\\.)?uploadfiles\\.io/[^\\s]+", "https?://(?:www\\.)?box\\.com/[^\\s]+", "https?://(?:www\\.)?pcloud\\.com/[^\\s]+", "https?://disk\\.yandex\\.[a-z]+/[^\\s]+", "https?://[^\\s]*(?:file|upload|share|download|drive|storage)[^\\s]*\\.[a-z]{2,4}/[^\\s]+"]'
3359 ```
60+ - 📖更多信息:[配置参考-JobConfiguration](https://ktoolbox.readthedocs.io/latest/configuration/reference/#ktoolbox.configuration.JobConfiguration)
3461
35- [//]: # (### 🪲 修复)
62+ ### 🪲 修复
63+
64+ - 移除了过时的配置 `job.post_structure.content_filepath`,请用 `job.post_structure.content` 代替
65+ - 修复 `sync-creator` 命令在 **获取帖子修订(revision)** 时缺少 404 响应的处理(即帖子无修订版本)导致的**任务创建缓慢**的问题 - #294
66+ - 修复 DDoS Guard Cookies 管理出现**重复 Cookie** 的问题(不再进行手动管理)
3667
3768## Upgrade
3869
@@ -41,4 +72,4 @@ Use this command to upgrade if you are using **pipx**:
4172pipx upgrade ktoolbox
4273```
4374
44- ** Full Changelog** : https://github.com/Ljzd-PRO/KToolBox/compare/v0.15.1 ...v0.16 .0
75+ ** Full Changelog** : https://github.com/Ljzd-PRO/KToolBox/compare/v0.16.0 ...v0.17 .0
0 commit comments