feat: 发布 2.5 版本

This commit is contained in:
2025-04-20 21:00:11 +08:00
parent 936b4f9075
commit d11929e92d
18 changed files with 91 additions and 64 deletions

View File

@@ -136,8 +136,6 @@ class CLI:
("--work_path", "-wp", "str", _("作品数据 / 文件保存根路径")),
("--folder_name", "-fn", "str", _("作品文件储存文件夹名称")),
("--name_format", "-nf", "str", _("作品文件名称格式")),
# ("--sec_ch_ua", "-su", "str", _("Sec-Ch-Ua")),
# ("--sec_ch_ua_platform", "-sp", "str", _("Sec-Ch-Ua-Platform")),
("--user_agent", "-ua", "str", "User-Agent"),
("--cookie", "-ck", "str", _("小红书网页版 Cookie无需登录")),
("--proxy", "-p", "str", _("网络代理")),
@@ -172,6 +170,15 @@ class CLI:
"bool",
_("是否将每个作者的作品储存至单独的文件夹"),
),
(
"--write_mtime",
"-wm",
"bool",
fill(
_("是否将作品文件的修改时间属性修改为作品的发布时间"),
width=55,
),
),
("--language", "-l", "choice", _("设置程序语言目前支持zh_CN、en_US")),
("--settings", "-s", "str", _("读取指定配置文件")),
(
@@ -290,6 +297,11 @@ class CLI:
"-aa",
type=bool,
)
@option(
"--write_mtime",
"-wm",
type=bool,
)
@option(
"--language",
"-l",

View File

@@ -203,6 +203,7 @@ class XHS:
data["采集时间"] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
data["下载地址"] = " ".join(data["下载地址"])
data["动图地址"] = " ".join(i or "NaN" for i in data["动图地址"])
data.pop("时间戳", None)
await self.data_recorder.add(**data)
async def __add_record(self, id_: str, result: list) -> None: