diff --git a/requirements.txt b/requirements.txt index 344b418..f236db9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,26 @@ -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 +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml --no-deps -o requirements.txt +aiofiles==24.1.0 + # via xhs-downloader (pyproject.toml) +aiosqlite==0.21.0 + # via xhs-downloader (pyproject.toml) +click==8.1.8 + # via xhs-downloader (pyproject.toml) +emoji==2.14.1 + # via xhs-downloader (pyproject.toml) +fastapi==0.115.8 + # via xhs-downloader (pyproject.toml) +httpx==0.28.1 + # via xhs-downloader (pyproject.toml) +lxml==5.3.1 + # via xhs-downloader (pyproject.toml) +pyperclip==1.9.0 + # via xhs-downloader (pyproject.toml) +pyyaml==6.0.2 + # via xhs-downloader (pyproject.toml) +rookiepy==0.5.6 + # via xhs-downloader (pyproject.toml) +textual==2.0.4 + # via xhs-downloader (pyproject.toml) +uvicorn==0.34.0 + # via xhs-downloader (pyproject.toml) diff --git a/source/application/app.py b/source/application/app.py index 1be8c10..5445744 100644 --- a/source/application/app.py +++ b/source/application/app.py @@ -34,7 +34,7 @@ from source.module import ( VERSION_MAJOR, VERSION_MINOR, VERSION_BETA, - __VERSION__ + __VERSION__, ) from source.module import logging from source.module import sleep_time diff --git a/source/application/image.py b/source/application/image.py index 1d62f9f..c6f8cf5 100644 --- a/source/application/image.py +++ b/source/application/image.py @@ -16,7 +16,13 @@ class Image: match format_: case "png" | "webp" | "jpeg" | "heic" | "avif": return [ - Html.format_url(cls.__generate_fixed_link(i, format_, )) for i in token_list + Html.format_url( + cls.__generate_fixed_link( + i, + format_, + ) + ) + for i in token_list ], live_link case "auto": return [ @@ -30,7 +36,10 @@ class Image: return f"https://sns-img-bd.xhscdn.com/{token}" @staticmethod - def __generate_fixed_link(token: str, format_: str, ) -> str: + def __generate_fixed_link( + token: str, + format_: str, + ) -> str: return f"https://ci.xiaohongshu.com/{token}?imageView2/format/{format_}" @staticmethod diff --git a/source/module/manager.py b/source/module/manager.py index b619b63..f9644c1 100644 --- a/source/module/manager.py +++ b/source/module/manager.py @@ -138,7 +138,14 @@ class Manager: @staticmethod def __check_image_format(image_format) -> str: - if (i := image_format.lower()) in {"auto", "png", "webp", "jpeg", "heic", "avif", }: + if (i := image_format.lower()) in { + "auto", + "png", + "webp", + "jpeg", + "heic", + "avif", + }: return i return "png"