Skip to content

Commit

Permalink
🐞 fix: 修复 xhs 有水印的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyu1998 committed Aug 5, 2024
1 parent c0a4f27 commit 5726d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion nonebot-plugin-resolver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ async def xiaohongshu(bot: Bot, event: Event):
download_img(item['urlDefault'], f'{os.getcwd()}/{str(index)}.jpg', session=session)))
links_path = await asyncio.gather(*aio_task)
elif type == 'video':
video_url = note_data['video']['media']['stream']['h264'][0]['masterUrl']
# ⚠️ 废弃,这是一条解析有水印的视频
# video_url = note_data['video']['video']['stream']['h264'][0]['masterUrl']

# 解析无水印视频video.consumer.originVideoKey}
video_url = f'http://sns-video-bd.xhscdn.com/{note_data['video']['consumer']['originVideoKey']}'
path = await download_video(video_url)
# await xhs.send(Message(MessageSegment.video(path)))
await auto_video_send(event, path, IS_LAGRANGE)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-resolver"
version = "1.1.13"
version = "1.1.14"
description = "NoneBot2链接分享解析器插件。解析视频、图片链接/小程序插件,tiktok、bilibili、twitter等实时发送!"
authors = ["zhiyu1998 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 5726d94

Please sign in to comment.