kmoe-manga-downloader 1.2.3b0__tar.gz → 1.2.4b0__tar.gz
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.
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/PKG-INFO +21 -4
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/README.md +20 -3
- kmoe_manga_downloader-1.2.4b0/assets/kmdr-log-demo.gif +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/_version.py +3 -3
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/session.py +1 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/main.py +1 -1
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/authenticator/utils.py +4 -1
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/OptionLister.py +1 -1
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/download_utils.py +13 -8
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/PKG-INFO +21 -4
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/SOURCES.txt +1 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/.github/workflows/release-package.yml +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/.github/workflows/unit-test.yml +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/.gitignore +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/LICENSE +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/assets/kmdr-demo.gif +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/mirror/mirrors.json +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/pyproject.toml +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/setup.cfg +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/bases.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/console.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/constants.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/context.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/defaults.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/error.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/protocol.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/registry.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/structure.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/core/utils.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/authenticator/CookieAuthenticator.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/authenticator/LoginAuthenticator.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/authenticator/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/BaseUrlUpdator.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/ConfigClearer.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/ConfigUnsetter.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/OptionSetter.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/configurer/option_validate.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/DirectDownloader.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/ReferViaDownloader.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/misc.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/BookUrlLister.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/FollowedBookLister.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/utils.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/ArgsFilterPicker.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/DefaultVolPicker.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/utils.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/dependency_links.txt +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/entry_points.txt +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/requires.txt +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmoe_manga_downloader.egg-info/top_level.txt +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/__init__.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_async_retry_decorator.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_kmdr_config_option.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_kmdr_download.py +0 -0
- {kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_utils_resolve_volme.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kmoe-manga-downloader
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4b0
|
|
4
4
|
Summary: A CLI-downloader for site @kox.moe.
|
|
5
5
|
Author-email: Chris Zheng <chrisis58@outlook.com>
|
|
6
6
|
License: MIT License
|
|
@@ -50,9 +50,26 @@ Dynamic: license-file
|
|
|
50
50
|
|
|
51
51
|
`kmdr (Kmoe Manga Downloader)` 是一个 Python 终端应用,用于从 [Kmoe](https://kxx.moe/) 网站下载漫画。它支持在终端环境下的登录、下载指定漫画及其卷,并支持回调脚本执行。
|
|
52
52
|
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
53
|
+
<table style="min-width: 600px;">
|
|
54
|
+
<tbody>
|
|
55
|
+
<tr>
|
|
56
|
+
<td style="text-align: center;" width="100">
|
|
57
|
+
交互模式
|
|
58
|
+
</td>
|
|
59
|
+
<td style="text-align: center;">
|
|
60
|
+
<img src="assets/kmdr-demo.gif" alt="kmdr 使用演示" />
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<td style="text-align: center;" width="100">
|
|
65
|
+
日志模式
|
|
66
|
+
</td>
|
|
67
|
+
<td style="text-align: center;">
|
|
68
|
+
<img src="assets/kmdr-log-demo.gif" alt="kmdr 日志使用演示" />
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</tbody>
|
|
72
|
+
</table>
|
|
56
73
|
|
|
57
74
|
## ✨功能特性
|
|
58
75
|
|
|
@@ -4,9 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
`kmdr (Kmoe Manga Downloader)` 是一个 Python 终端应用,用于从 [Kmoe](https://kxx.moe/) 网站下载漫画。它支持在终端环境下的登录、下载指定漫画及其卷,并支持回调脚本执行。
|
|
6
6
|
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
7
|
+
<table style="min-width: 600px;">
|
|
8
|
+
<tbody>
|
|
9
|
+
<tr>
|
|
10
|
+
<td style="text-align: center;" width="100">
|
|
11
|
+
交互模式
|
|
12
|
+
</td>
|
|
13
|
+
<td style="text-align: center;">
|
|
14
|
+
<img src="assets/kmdr-demo.gif" alt="kmdr 使用演示" />
|
|
15
|
+
</td>
|
|
16
|
+
</tr>
|
|
17
|
+
<tr>
|
|
18
|
+
<td style="text-align: center;" width="100">
|
|
19
|
+
日志模式
|
|
20
|
+
</td>
|
|
21
|
+
<td style="text-align: center;">
|
|
22
|
+
<img src="assets/kmdr-log-demo.gif" alt="kmdr 日志使用演示" />
|
|
23
|
+
</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
10
27
|
|
|
11
28
|
## ✨功能特性
|
|
12
29
|
|
|
Binary file
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '1.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 2,
|
|
31
|
+
__version__ = version = '1.2.4b0'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 2, 4, 'b0')
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g4623b0002'
|
|
@@ -10,7 +10,7 @@ from kmdr.module import *
|
|
|
10
10
|
async def main(args: Namespace, fallback: Callable[[], None] = lambda: print('NOT IMPLEMENTED!')) -> None:
|
|
11
11
|
|
|
12
12
|
post_init(args)
|
|
13
|
-
log('[Lifecycle:Start] 启动 kmdr
|
|
13
|
+
log('[Lifecycle:Start] 启动 kmdr, 版本', __version__)
|
|
14
14
|
debug('[bold green]以调试模式启动[/bold green]')
|
|
15
15
|
debug('接收到的参数:', args)
|
|
16
16
|
|
|
@@ -77,7 +77,10 @@ def extract_var_define(script_text) -> dict[str, str]:
|
|
|
77
77
|
line = line.strip()
|
|
78
78
|
if line.startswith("var ") and "=" in line:
|
|
79
79
|
var_name, var_value = line[4:].split("=", 1)
|
|
80
|
-
|
|
80
|
+
var_value = var_value.strip().strip(";").strip('"')
|
|
81
|
+
if var_name and var_value:
|
|
82
|
+
var_define[var_name.strip()] = var_value
|
|
83
|
+
debug("解析到变量定义: ", var_define)
|
|
81
84
|
return var_define
|
|
82
85
|
|
|
83
86
|
def __resolve_quota_id(is_vip: Optional[int] = None, user_level: Optional[int] = None):
|
|
@@ -26,7 +26,7 @@ class OptionLister(Configurer):
|
|
|
26
26
|
|
|
27
27
|
if self._configurer.option is not None:
|
|
28
28
|
for idx, (key, value) in enumerate(self._configurer.option.items()):
|
|
29
|
-
value_to_display = value
|
|
29
|
+
value_to_display = str(value)
|
|
30
30
|
if isinstance(value, (dict, list, set, tuple)):
|
|
31
31
|
value_to_display = Pretty(value)
|
|
32
32
|
|
|
@@ -13,6 +13,7 @@ from rich.progress import Progress
|
|
|
13
13
|
from aiohttp.client_exceptions import ClientPayloadError
|
|
14
14
|
|
|
15
15
|
from kmdr.core.console import info, log, debug
|
|
16
|
+
from kmdr.core.error import ResponseError
|
|
16
17
|
|
|
17
18
|
from .misc import STATUS, StateManager
|
|
18
19
|
|
|
@@ -161,8 +162,7 @@ async def download_file_multipart(
|
|
|
161
162
|
info(f"[blue]{filename} 已经存在[/blue]")
|
|
162
163
|
return
|
|
163
164
|
|
|
164
|
-
log(
|
|
165
|
-
|
|
165
|
+
log("开始下载文件:", filename)
|
|
166
166
|
part_paths = []
|
|
167
167
|
part_expected_sizes = []
|
|
168
168
|
task_id = None
|
|
@@ -171,12 +171,17 @@ async def download_file_multipart(
|
|
|
171
171
|
try:
|
|
172
172
|
current_url = await fetch_url(url)
|
|
173
173
|
|
|
174
|
-
async with
|
|
175
|
-
#
|
|
176
|
-
#
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
async with semaphore:
|
|
175
|
+
# 获取文件信息,请求以获取文件大小
|
|
176
|
+
# 复用 semaphore 以控制并发,避免过多并发请求触发服务器限流
|
|
177
|
+
async with session.head(current_url, headers=headers, allow_redirects=True) as response:
|
|
178
|
+
# 注意:这个请求完成后,服务器就会记录这次下载,并消耗对应的流量配额,详细的规则请参考网站说明:
|
|
179
|
+
# 注 1 : 訂閱連載中的漫畫,有更新時自動推送的卷(冊),暫不計算在使用額度中,不扣減使用額度。
|
|
180
|
+
# 注 2 : 對同一卷(冊)書在 12 小時內重複*下載*,不會重複扣減額度。但重復推送是會扣減的。
|
|
181
|
+
response.raise_for_status()
|
|
182
|
+
if 'Content-Length' not in response.headers:
|
|
183
|
+
raise ResponseError("无法从服务器获取文件大小,请检查网络连接或稍后重试。", status_code=response.status)
|
|
184
|
+
total_size = int(response.headers['Content-Length'])
|
|
180
185
|
|
|
181
186
|
chunk_size = chunk_size_mb * 1024 * 1024
|
|
182
187
|
num_chunks = math.ceil(total_size / chunk_size)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kmoe-manga-downloader
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4b0
|
|
4
4
|
Summary: A CLI-downloader for site @kox.moe.
|
|
5
5
|
Author-email: Chris Zheng <chrisis58@outlook.com>
|
|
6
6
|
License: MIT License
|
|
@@ -50,9 +50,26 @@ Dynamic: license-file
|
|
|
50
50
|
|
|
51
51
|
`kmdr (Kmoe Manga Downloader)` 是一个 Python 终端应用,用于从 [Kmoe](https://kxx.moe/) 网站下载漫画。它支持在终端环境下的登录、下载指定漫画及其卷,并支持回调脚本执行。
|
|
52
52
|
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
53
|
+
<table style="min-width: 600px;">
|
|
54
|
+
<tbody>
|
|
55
|
+
<tr>
|
|
56
|
+
<td style="text-align: center;" width="100">
|
|
57
|
+
交互模式
|
|
58
|
+
</td>
|
|
59
|
+
<td style="text-align: center;">
|
|
60
|
+
<img src="assets/kmdr-demo.gif" alt="kmdr 使用演示" />
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<td style="text-align: center;" width="100">
|
|
65
|
+
日志模式
|
|
66
|
+
</td>
|
|
67
|
+
<td style="text-align: center;">
|
|
68
|
+
<img src="assets/kmdr-log-demo.gif" alt="kmdr 日志使用演示" />
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</tbody>
|
|
72
|
+
</table>
|
|
56
73
|
|
|
57
74
|
## ✨功能特性
|
|
58
75
|
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/.github/workflows/unit-test.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/downloader/misc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/__init__.py
RENAMED
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/lister/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/__init__.py
RENAMED
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/src/kmdr/module/picker/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_async_retry_decorator.py
RENAMED
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_kmdr_config_option.py
RENAMED
|
File without changes
|
|
File without changes
|
{kmoe_manga_downloader-1.2.3b0 → kmoe_manga_downloader-1.2.4b0}/tests/test_utils_resolve_volme.py
RENAMED
|
File without changes
|