diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/example.py b/example.py index 881415c..9e40326 100644 --- a/example.py +++ b/example.py @@ -60,7 +60,7 @@ async def example(): async def test(): url = "" async with XHS() as xhs: - print(await xhs.extract(url)) + print(await xhs.extract(url, download=True, )) if __name__ == "__main__": diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..dc68cb1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[project] +name = "XHS-Downloader" +version = "2.5.beta" +description = "小红书(XiaoHongShu、RedNote)链接提取/作品采集工具:提取账号发布、收藏、点赞、专辑作品链接;提取搜索结果作品、用户链接;采集小红书作品信息;提取小红书作品下载地址;下载小红书无水印作品文件" +authors = [ + { name = "JoeanAmier", email = "yonglelolu@foxmail.com" }, +] +readme = "README.md" +license = "GPL-3.0" +requires-python = ">=3.12,<3.13" +dependencies = [ + "aiofiles>=24.1.0", + "aiosqlite>=0.21.0", + "click>=8.1.8", + "emoji>=2.14.1", + "fastapi>=0.115.8", + "httpx[socks]>=0.28.1", + "lxml>=5.3.1", + "pyperclip>=1.9.0", + "pyyaml>=6.0.2", + "rookiepy>=0.5.6", + "textual>=1.0.0", + "uvicorn>=0.34.0", +] + +[project.urls] +Repository = "https://github.com/JoeanAmier/XHS-Downloader" + +[tool.uv.pip] +index-url = "https://mirrors.ustc.edu.cn/pypi/simple" diff --git a/requirements.txt b/requirements.txt index b3ce4b1..344b418 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ -textual>=1.0.0 -pyperclip>=1.9.0 -lxml>=5.3.0 -PyYAML>=6.0.2 -aiosqlite>=0.20.0 -click>=8.1.7 -rookiepy>=0.5.6 -httpx[socks]>=0.28.0 -fastapi>=0.112.1 -uvicorn>=0.30.6 aiofiles>=24.1.0 -emoji>=2.14.0 +aiosqlite>=0.21.0 +click>=8.1.8 +emoji>=2.14.1 +fastapi>=0.115.8 +httpx[socks]>=0.28.1 +lxml>=5.3.1 +pyperclip>=1.9.0 +pyyaml>=6.0.2 +rookiepy>=0.5.6 +textual>=1.0.0 +uvicorn>=0.34.0 diff --git a/source/module/static.py b/source/module/static.py index 075afd0..c69ad6e 100644 --- a/source/module/static.py +++ b/source/module/static.py @@ -3,6 +3,7 @@ from pathlib import Path VERSION_MAJOR = 2 VERSION_MINOR = 5 VERSION_BETA = True +__version__ = f"{VERSION_MAJOR}.{VERSION_MINOR}.{"beta" if VERSION_BETA else "stable"}" ROOT = Path(__file__).resolve().parent.parent.parent PROJECT = f"XHS-Downloader V{VERSION_MAJOR}.{ VERSION_MINOR} {"Beta" if VERSION_BETA else "Stable"}" @@ -53,3 +54,6 @@ FILE_SIGNATURES: tuple[tuple[int, bytes, str,], ...] = ( FILE_SIGNATURES_LENGTH = max(offset + len(signature) for offset, signature, _ in FILE_SIGNATURES) MAX_WORKERS: int = 4 + +if __name__ == "__main__": + print(__version__)