mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
perf: 默认开启局域网访问
1. 更正 README 使用方法内容 2. 更正 Dockerfile 版本号 Closes #134 Closes #135 Closes #137
This commit is contained in:
parent
3e8b69f8e1
commit
678afea954
@ -1,6 +1,6 @@
|
||||
FROM python:3.12.4-slim
|
||||
|
||||
LABEL name="XHS-Downloader" version="2.1" authors="JoeanAmier"
|
||||
LABEL name="XHS-Downloader" version="2.2 Beta" authors="JoeanAmier"
|
||||
|
||||
COPY locale /locale
|
||||
COPY source /source
|
||||
|
||||
@ -73,8 +73,8 @@
|
||||
</ul>
|
||||
<li>创建容器</li>
|
||||
<ul>
|
||||
<li>TUI 模式:<code>docker run -it joeanamier/xhs-downloader:2.1</code></li>
|
||||
<li>API 模式:<code>docker run -it joeanamier/xhs-downloader:2.1 python main.py server</code></li>
|
||||
<li>TUI 模式:<code>docker run -it joeanamier/xhs-downloader</code></li>
|
||||
<li>API 模式:<code>docker run -it joeanamier/xhs-downloader python main.py server</code></li>
|
||||
</ul>
|
||||
</ol>
|
||||
<p>Docker 运行项目时不支持 <b>命令行调用模式</b>,无法使用 <b>读取剪贴板</b> 与 <b>监听剪贴板</b> 功能,可以正常粘贴内容,其他功能如有异常请反馈!</p>
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
</ul>
|
||||
<li>Create Container</li>
|
||||
<ul>
|
||||
<li>TUI Mode: <code>docker run -it joeanamier/xhs-downloader:2.1</code></li>
|
||||
<li>API Mode: <code>docker run -it joeanamier/xhs-downloader:2.1 python main.py server</code></li>
|
||||
<li>TUI Mode: <code>docker run -it joeanamier/xhs-downloader</code></li>
|
||||
<li>API Mode: <code>docker run -it joeanamier/xhs-downloader python main.py server</code></li>
|
||||
</ul>
|
||||
</ol>
|
||||
<p>When running the project via Docker, the <b>command line call mode</b> is not supported. The <b>clipboard reading</b> and <b>clipboard monitoring</b> functions are unavailable, but pasting content works fine. Please provide feedback if other features are not functioning properly!</p>
|
||||
|
||||
6
main.py
6
main.py
@ -30,8 +30,8 @@ async def example():
|
||||
record_data = False # 是否保存作品数据至文件
|
||||
image_format = "WEBP" # 图文作品文件下载格式,支持:PNG、WEBP
|
||||
folder_mode = False # 是否将每个作品的文件储存至单独的文件夹
|
||||
async with XHS() as xhs:
|
||||
pass # 使用默认参数
|
||||
# async with XHS() as xhs:
|
||||
# pass # 使用默认参数
|
||||
async with XHS(work_path=work_path,
|
||||
folder_name=folder_name,
|
||||
name_format=name_format,
|
||||
@ -61,7 +61,7 @@ async def app():
|
||||
await xhs.run_async()
|
||||
|
||||
|
||||
async def server(host="127.0.0.1", port=8000, log_level="info", ):
|
||||
async def server(host="0.0.0.0", port=8000, log_level="info", ):
|
||||
async with XHS(**Settings().run()) as xhs:
|
||||
await xhs.run_server(host, port, log_level, )
|
||||
|
||||
|
||||
@ -380,8 +380,9 @@ class XHS:
|
||||
|
||||
async def run_server(self, host="0.0.0.0", port=8000, log_level="info", ):
|
||||
self.server = FastAPI(
|
||||
debug=self.VERSION_BETA,
|
||||
title="XHS-Downloader",
|
||||
version=f"{VERSION_MAJOR}.{VERSION_MINOR}")
|
||||
version=f"{self.VERSION_MAJOR}.{self.VERSION_MINOR}")
|
||||
self.setup_routes()
|
||||
config = Config(
|
||||
self.server,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user