From c43f3ad23e317f8dbf65846bcaaa2f4fba07ab21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8?= Date: Fri, 21 Mar 2025 20:47:13 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E4=BD=9C=E8=80=85?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E4=BF=9D=E5=AD=98=E6=A8=A1=E5=BC=8F=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8D=E7=A7=B0=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- README_EN.md | 3 ++- source/application/app.py | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f632935..fb44e23 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,7 @@ async def example(): # 返回作品详细信息,包括下载地址 # 获取数据失败时返回空字典 print(await xhs.extract(demo_link, download, index=[1, 2])) +

📋 读取剪贴板

项目使用 pyperclip 实现读取剪贴板功能,该模块在不同的系统上会有差异。

@@ -383,7 +384,7 @@ async def example(): account_archive bool -是否将每个作者的作品储存至单独的文件夹;文件夹名称为作者昵称或者作者 ID +是否将每个作者的作品储存至单独的文件夹;文件夹名称为 作者ID_作者昵称 false diff --git a/README_EN.md b/README_EN.md index 4241c32..26c195f 100644 --- a/README_EN.md +++ b/README_EN.md @@ -268,6 +268,7 @@ async def example(): # 返回作品详细信息,包括下载地址 # 获取数据失败时返回空字典 print(await xhs.extract(demo_link, download, index=[1, 2])) +

📋 Read Clipboard

The project uses pyperclip to implement clipboard reading functionality, which varies across different systems.

@@ -387,7 +388,7 @@ async def example(): account_archive bool -Whether to save each author's works into a separate folder; the folder name will be the author's nickname or author ID +Whether to save each author's works into a separate folder; The folder name is authorID_nickname false diff --git a/source/application/app.py b/source/application/app.py index 7179cdf..cc6c64e 100644 --- a/source/application/app.py +++ b/source/application/app.py @@ -12,6 +12,7 @@ from urllib.parse import urlparse from fastapi import FastAPI from fastapi.responses import RedirectResponse from pyperclip import copy + # from aiohttp import web from pyperclip import paste from uvicorn import Config @@ -174,8 +175,9 @@ class XHS: u, container["动图地址"], index, - self.CLEANER.filter_name(container["作者昵称"]) - or container["作者ID"], + container["作者ID"] + + "_" + + self.CLEANER.filter_name(container["作者昵称"]), name, container["作品类型"], log,