mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-25 20:36:47 +08:00
build: 更新项目构建配置
- 添加 pyproject.toml 文件,配置项目信息和依赖 - 更新 requirements.txt,调整依赖版本 - 在 static.py 中添加版本号变量 - 添加 .python-version 文件,指定 Python 版本
This commit is contained in:
parent
697ff3f7a3
commit
94198f5a51
1
.python-version
Normal file
1
.python-version
Normal file
@ -0,0 +1 @@
|
||||
3.12
|
||||
@ -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__":
|
||||
|
||||
30
pyproject.toml
Normal file
30
pyproject.toml
Normal file
@ -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"
|
||||
@ -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
|
||||
|
||||
@ -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__)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user