mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
fix(script): 修复视频作品下载功能
This commit is contained in:
@@ -11,9 +11,10 @@
|
||||
|
||||
**用户脚本更新内容:**
|
||||
|
||||
**版本号:2.2.3**
|
||||
**版本号:2.2.4**
|
||||
|
||||
1. 新增链接提取/图片下载选择模式开关
|
||||
2. 修复合辑作品链接提取失败的问题
|
||||
3. 链接提取选择界面添加序号显示
|
||||
4. 新增推送下载任务至服务器功能
|
||||
5. 修复视频作品下载功能
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// @name XHS-Downloader
|
||||
// @namespace xhs_downloader
|
||||
// @homepage https://github.com/JoeanAmier/XHS-Downloader
|
||||
// @version 2.2.3
|
||||
// @version 2.2.4
|
||||
// @tag 小红书
|
||||
// @tag RedNote
|
||||
// @description 提取小红书作品/用户链接,下载小红书无水印图文/视频作品文件
|
||||
@@ -219,10 +219,17 @@ KS-Downloader(快手、KuaiShou):https://github.com/JoeanAmier/KS-Download
|
||||
}
|
||||
|
||||
const generateVideoUrl = note => {
|
||||
// try {
|
||||
// return [`https://sns-video-bd.xhscdn.com/${note.video.consumer.originVideoKey}`];
|
||||
// } catch (error) {
|
||||
// console.error("Error generating video URL:", error);
|
||||
// return [];
|
||||
// }
|
||||
try {
|
||||
return [`https://sns-video-bd.xhscdn.com/${note.video.consumer.originVideoKey}`];
|
||||
const video = note.video.media.stream.h265;
|
||||
return [video[video.length - 1].masterUrl];
|
||||
} catch (error) {
|
||||
console.error("Error generating video URL:", error);
|
||||
console.error("Error extract video URL:", error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user