feat: 发布 2.3 版本

This commit is contained in:
JoeanAmier
2024-11-10 11:00:31 +08:00
parent de28b9de69
commit 5463854906
10 changed files with 13 additions and 13 deletions

View File

@@ -31,14 +31,15 @@ class BrowserCookie:
"Firefox": (firefox, "Linux, macOS, Windows"),
"LibreWolf": (librewolf, "Linux, macOS, Windows"),
}
TIP = "Windows 系统需要以管理员身份运行程序才能读取 Chromium、Chrome、Edge 浏览器 Cookie"
@classmethod
def run(cls, domains: list[str], console: Console = None, ) -> str:
console = console or Console()
options = "\n".join(f"{i}. {k}: {v[1]}" for i, (k, v) in enumerate(cls.SUPPORT_BROWSER.items(), start=1))
if browser := console.input(
f"读取指定浏览器的 Cookie 并写入配置文件;注意:{cls.TIP}\n{options}\n请输入浏览器名称或序号:", ):
f"读取指定浏览器的 Cookie 并写入配置文件\n"
f"Windows 系统需要以管理员身份运行程序才能读取 Chromium、Chrome、Edge 浏览器 Cookie\n"
f"{options}\n请输入浏览器名称或序号:", ):
return cls.get(browser, domains, console, )
console.print("未选择浏览器!")

View File

@@ -2,7 +2,7 @@ from pathlib import Path
VERSION_MAJOR = 2
VERSION_MINOR = 3
VERSION_BETA = True
VERSION_BETA = False
ROOT = Path(__file__).resolve().parent.parent.parent
PROJECT = f"XHS-Downloader V{VERSION_MAJOR}.{
VERSION_MINOR}{" Beta" if VERSION_BETA else ""}"
@@ -65,4 +65,4 @@ FILE_SIGNATURES: tuple[tuple[int, bytes, str,], ...] = (
)
FILE_SIGNATURES_LENGTH = max(offset + len(signature) for offset, signature, _ in FILE_SIGNATURES)
MAX_WORKERS: int = 3
MAX_WORKERS: int = 4

View File

@@ -1,6 +1,6 @@
from gettext import translation
from source.module import ROOT
from ..module import ROOT
__all__ = ["Translate"]