mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
feat(XHS-Downloader.js): 新增专辑作品链接提取功能
1. 优化 Tampermonkey 用户脚本代码 2. 支持提取发现作品链接自动滚动屏幕 3. 更新依赖库版本 4. 更新项目参考
This commit is contained in:
parent
a4d1a40d11
commit
77b1d05ad8
10
README.md
10
README.md
@ -7,6 +7,7 @@
|
||||
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/JoeanAmier/XHS-Downloader?style=for-the-badge&color=ff7875">
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/UserScript-ffec3d?style=for-the-badge&logo=tampermonkey&logoColor=%2300485B">
|
||||
<br>
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/Python-3.12-3498db?style=for-the-badge&logo=python&labelColor=fffa65">
|
||||
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/JoeanAmier/XHS-Downloader?style=for-the-badge&color=73d13d">
|
||||
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/JoeanAmier/XHS-Downloader?style=for-the-badge&color=40a9ff">
|
||||
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/JoeanAmier/XHS-Downloader/total?style=for-the-badge&color=f759ab">
|
||||
@ -422,9 +423,12 @@ async def example():
|
||||
* https://github.com/encode/httpx/
|
||||
* https://github.com/tiangolo/fastapi
|
||||
* https://github.com/textualize/textual/
|
||||
* https://textual.textualize.io/
|
||||
* https://github.com/omnilib/aiosqlite
|
||||
* https://aiosqlite.omnilib.dev/en/stable/
|
||||
* https://click.palletsprojects.com/en/8.1.x/
|
||||
* https://github.com/thewh1teagle/rookie
|
||||
* https://github.com/carpedm20/emoji/
|
||||
* https://github.com/asweigart/pyperclip
|
||||
* https://github.com/lxml/lxml
|
||||
* https://github.com/yaml/pyyaml
|
||||
* https://github.com/pallets/click/
|
||||
* https://github.com/encode/uvicorn
|
||||
* https://github.com/Tinche/aiofiles
|
||||
|
||||
10
README_EN.md
10
README_EN.md
@ -7,6 +7,7 @@
|
||||
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/JoeanAmier/XHS-Downloader?style=for-the-badge&color=ff7875">
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/UserScript-ffec3d?style=for-the-badge&logo=tampermonkey&logoColor=%2300485B">
|
||||
<br>
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/Python-3.12-3498db?style=for-the-badge&logo=python&labelColor=fffa65">
|
||||
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/JoeanAmier/XHS-Downloader?style=for-the-badge&color=73d13d">
|
||||
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/JoeanAmier/XHS-Downloader?style=for-the-badge&color=40a9ff">
|
||||
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/JoeanAmier/XHS-Downloader/total?style=for-the-badge&color=f759ab">
|
||||
@ -423,9 +424,12 @@ async def example():
|
||||
* https://github.com/encode/httpx/
|
||||
* https://github.com/tiangolo/fastapi
|
||||
* https://github.com/textualize/textual/
|
||||
* https://textual.textualize.io/
|
||||
* https://github.com/omnilib/aiosqlite
|
||||
* https://aiosqlite.omnilib.dev/en/stable/
|
||||
* https://click.palletsprojects.com/en/8.1.x/
|
||||
* https://github.com/thewh1teagle/rookie
|
||||
* https://github.com/carpedm20/emoji/
|
||||
* https://github.com/asweigart/pyperclip
|
||||
* https://github.com/lxml/lxml
|
||||
* https://github.com/yaml/pyyaml
|
||||
* https://github.com/pallets/click/
|
||||
* https://github.com/encode/uvicorn
|
||||
* https://github.com/Tinche/aiofiles
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
textual<=0.63.0
|
||||
pyperclip>=1.9.0
|
||||
lxml>=5.2.2
|
||||
PyYAML>=6.0.1
|
||||
lxml>=5.3.0
|
||||
PyYAML>=6.0.2
|
||||
aiosqlite>=0.20.0
|
||||
click>=8.1.7
|
||||
rookiepy>=0.5.2
|
||||
httpx>=0.27.0
|
||||
fastapi>=0.111.0
|
||||
uvicorn>=0.30.1
|
||||
fastapi>=0.112.1
|
||||
uvicorn>=0.30.6
|
||||
aiofiles>=24.1.0
|
||||
emoji>=2.12.1
|
||||
|
||||
@ -144,7 +144,7 @@ class Download:
|
||||
real = path.joinpath(f"{name}.{suffix}")
|
||||
self.__update_headers_range(headers, temp, )
|
||||
try:
|
||||
# print(f"{url} Stream Headers:", headers) # 调试代码
|
||||
# print(f"{url} Stream Headers:", headers.get("Range")) # 调试代码
|
||||
async with self.client.stream("GET", url, headers=headers, ) as response:
|
||||
response.raise_for_status()
|
||||
# self.__create_progress(
|
||||
@ -192,7 +192,7 @@ class Download:
|
||||
headers: dict[str, str],
|
||||
suffix: str,
|
||||
) -> [int, str]:
|
||||
# print(f"{url} Head Headers:", headers) # 调试代码
|
||||
# print(f"{url} Head Headers:", headers.get("Range")) # 调试代码
|
||||
response = await self.client.head(
|
||||
url,
|
||||
headers=headers,
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user