docs: 更正 README 内容

This commit is contained in:
JoeanAmier 2024-08-07 22:27:55 +08:00
parent 7cedd8d4b8
commit 169128de8d
4 changed files with 22 additions and 15 deletions

View File

@ -3,7 +3,7 @@ name: Build and Push Docker Image
on:
release:
types: [published]
workflow_dispatch: # 允许手动触发工作流
workflow_dispatch:
jobs:
publish-docker:

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, windows-latest]
python-version: [3.12]
steps:
@ -28,12 +28,15 @@ jobs:
pip install pyinstaller
- name: 构建可执行文件
if: runner.os == 'Windows'
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py
else
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
fi
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py
shell: pwsh
- name: Build executable on macOS
if: runner.os == 'macOS'
run: |
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
- name: 上传文件
uses: actions/upload-artifact@v4

View File

@ -30,6 +30,7 @@
<li>✅ 从浏览器读取 Cookie</li>
<li>✅ 自定义文件名称格式</li>
<li>✅ 支持 API 调用功能</li>
<li>✅ 支持文件断点续传下载</li>
</ul>
<ul><b>脚本功能</b>
<li>✅ 下载小红书无水印作品文件</li>
@ -62,7 +63,7 @@
<p>如果仅需下载无水印作品文件,建议选择 <b>程序运行</b><b>Docker 运行</b>;如果有其他需求,建议选择 <b>源码运行</b></p>
<p>建议自行设置 <code>cookie</code> 参数,若不设置该参数,程序功能可能无法正常使用!</p>
<h2>🖱 程序运行</h2>
<p>Windows 10 及以上用户可前往 <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> 下载程序压缩包,解压后打开程序文件夹,双击运行 <code>main.exe</code> 即可使用。</p>
<p>Mac OS(尚未测试)、Windows 10 及以上用户可前往 <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> 下载程序压缩包,解压后打开程序文件夹,双击运行 <code>main</code> 即可使用。</p>
<p>若通过此方式使用程序,文件默认下载路径为:<code>.\_internal\Download</code>;配置文件路径为:<code>.\_internal\settings.json</code></p>
<h2>⌨️ Docker 运行</h2>
<ol>
@ -81,8 +82,9 @@
<h2>⌨️ 源码运行</h2>
<ol>
<li>安装版本号不低于 <code>3.12</code> 的 Python 解释器</li>
<li>运行 <code>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt</code> 命令安装程序所需模块</li>
<li>下载本项目最新的源码或 <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> 发布的源码至本地</li>
<li>打开终端,切换至项目根路径</li>
<li>运行 <code>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt</code> 命令安装程序所需模块</li>
<li>运行 <code>main.py</code> 即可使用</li>
</ol>
<h1>🛠 命令行模式</h1>
@ -185,8 +187,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,

View File

@ -31,6 +31,7 @@
<li>✅ Read cookies from browser</li>
<li>✅ Customizable file name format</li>
<li>✅ Support API call functionality</li>
<li>✅ Support file breakpoint resume download</li>
</ul>
<ul><b>Script Features</b>
<li>✅ Download Xiaohongshu watermark-free content files</li>
@ -63,7 +64,7 @@
<p>If you only need to download watermark-free content files, it is recommended to choose <b>Program Run</b>; if you have other needs, it is recommended to choose <b>Source Code Run</b>!</p>
<p>It is recommended to set the <code>cookie</code> parameter manually; if this parameter is not set, the program functions may not work properly!</p>
<h2>🖱 Program Run</h2>
<p>Windows 10 and above users can go to <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> to download the program package, unzip it, open the program folder, and double-click to run <code>main.exe</code> to use.</p>
<p>Mac OS, Windows 10 and above users can go to <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> to download the program package, unzip it, open the program folder, and double-click to run <code>main</code> to use.</p>
<p>If you use the program in this way, the default download path for files is: <code>.\_internal\Download</code>; the configuration file path is: <code>.\_internal\settings.json</code></p>
<h2>⌨️ Docker Run</h2>
<ol>
@ -82,8 +83,9 @@
<h2>⌨️ Source Code Run</h2>
<ol>
<li>Install the Python interpreter with a version no lower than <code>3.12</code></li>
<li>Run the command <code>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt</code> to install the required modules</li>
<li>Download the latest source code of this project or the source code released in <a href="https://github.com/JoeanAmier/XHS-Downloader/releases/latest">Releases</a> to your local machine</li>
<li>Open the terminal and switch to the root path of the project</li>
<li>Run the command <code>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt</code> to install the required modules</li>
<li>Run <code>main.py</code> to use</li>
</ol>
<h1>🛠 Command Line Mode</h1>
@ -189,8 +191,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,