|
@@ -7,28 +7,42 @@
|
|
|
|
|
|
<el-main ref="el-main" style="background-color: #fafafa;">
|
|
<el-main ref="el-main" style="background-color: #fafafa;">
|
|
<template>
|
|
<template>
|
|
- <div style="padding: 20px 20px 0 20px; height: 100%;">
|
|
|
|
- <el-row type="flex" justify="space-between">
|
|
|
|
- <div>
|
|
|
|
- <h3 style="display: inline-block;">
|
|
|
|
- 视频下载
|
|
|
|
- </h3>
|
|
|
|
- <!-- <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="下载类型至少选一个,评论图默认只下载商品首页展示的评论内容">
|
|
|
|
- <i class="el-icon-info" slot="reference" style="margin-right: 10px; color: #F56C6C;"></i>
|
|
|
|
- </el-popover> -->
|
|
|
|
- <el-link :underline="false" type="danger" style="text-align: center; font-size: 12px;">
|
|
|
|
- 不支持win7及以下系统
|
|
|
|
- </el-link>
|
|
|
|
-
|
|
|
|
|
|
+ <div style="padding: 10px 20px 0 20px; height: 100%;">
|
|
|
|
+ <div style="text-align: center;">
|
|
|
|
+ <p class="c-titles">星优-在线视频下载助手</p>
|
|
|
|
+ <div style="padding-top: 8px; font-weight: 600;">
|
|
|
|
+ 支持
|
|
|
|
+ <img src="../assets/image/douyin.png" class="soft-icon" title="抖音" />
|
|
|
|
+ <img src="../assets/image/weibo.png" class="soft-icon" title="微博" />
|
|
|
|
+ <img src="../assets/image/kuaishou.png" class="soft-icon" title="快手" />
|
|
|
|
+ <img src="../assets/image/xiaohongshu.png" class="soft-icon" title="小红书" />
|
|
|
|
+ <img src="../assets/image/bilibili.png" class="soft-icon" title="b站" />
|
|
|
|
+ <img src="../assets/image/cctv.png" class="soft-icon" title="cctv" />
|
|
|
|
+ <img src="../assets/image/56.png" class="soft-icon" title="56视频" />
|
|
|
|
+ <img src="../assets/image/acfun.png" class="soft-icon" title="acfun" />
|
|
|
|
+ 等多个平台,<span style="color: #F56C6C;">(建议使用win7以上系统)</span>
|
|
|
|
+
|
|
|
|
+ <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="会员/付费/版权视频不支持下载">
|
|
|
|
+ <i class="el-icon-info" slot="reference" style="margin-right: 10px; color: #F56C6C;"></i>
|
|
|
|
+ </el-popover>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </el-row>
|
|
|
|
|
|
|
|
<div style="margin-top: 20px;">
|
|
<div style="margin-top: 20px;">
|
|
- <el-input type="textarea" :rows="8" placeholder="请输入需要解析的视频地址" v-model="formatUrl"></el-input>
|
|
|
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="请输入需要解析的视频地址" v-model="formatUrl"></el-input>
|
|
|
|
|
|
- <div class="content-top" style="padding: 10px 0;">
|
|
|
|
|
|
+ <div class="content-top" style="padding: 10px 0; text-align: center; display: inherit;">
|
|
|
|
+ <el-button type="danger" @click="startParsing()" :loading="parseLoading">开始解析</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="table-scroll" style="height: calc(100% - 290px); overflow: hidden;">
|
|
|
|
+ <el-row type="flex" justify="space-between">
|
|
<div>
|
|
<div>
|
|
- <el-button type="danger" @click="startParsing()" :loading="parseLoading">点击解析</el-button>
|
|
|
|
|
|
+ <h4 style="display: inline-block;">
|
|
|
|
+ 视频信息:
|
|
|
|
+ </h4>
|
|
</div>
|
|
</div>
|
|
<el-row type="flex" style="align-items: center;">
|
|
<el-row type="flex" style="align-items: center;">
|
|
<div class="set-item">
|
|
<div class="set-item">
|
|
@@ -39,22 +53,6 @@
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
- </div>
|
|
|
|
-
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <div class="table-scroll" style="height: calc(100% - 330px); overflow: hidden;">
|
|
|
|
- <el-row type="flex" justify="space-between">
|
|
|
|
- <div>
|
|
|
|
- <h4 style="display: inline-block;">
|
|
|
|
- 视频信息:
|
|
|
|
- </h4>
|
|
|
|
- <el-link :underline="false" style="font-size: 12px;">
|
|
|
|
-
|
|
|
|
- </el-link>
|
|
|
|
-
|
|
|
|
- </div>
|
|
|
|
</el-row>
|
|
</el-row>
|
|
<vxe-table ref="xTable" show-overflow class="img-table" max-height="100%" empty-text="没有更多数据了!" :loading="tabLoading" :row-config="{isHover: true}"
|
|
<vxe-table ref="xTable" show-overflow class="img-table" max-height="100%" empty-text="没有更多数据了!" :loading="tabLoading" :row-config="{isHover: true}"
|
|
:loading-config="{icon: 'vxe-icon-indicator roll', text: '加载中...'}" :data="videoList" :scroll-y="{enabled: true}">
|
|
:loading-config="{icon: 'vxe-icon-indicator roll', text: '加载中...'}" :data="videoList" :scroll-y="{enabled: true}">
|
|
@@ -68,7 +66,8 @@
|
|
<vxe-column field="fps" title="帧率" width="60"></vxe-column>
|
|
<vxe-column field="fps" title="帧率" width="60"></vxe-column>
|
|
<vxe-column field="filesize" title="大小" width="90">
|
|
<vxe-column field="filesize" title="大小" width="90">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- {{$utils.handleSize(row.filesize)}}
|
|
|
|
|
|
+ <span v-if="row.filesize">{{$utils.handleSize(row.filesize)}}</span>
|
|
|
|
+ <span v-else-if="row.filesize_approx">{{$utils.handleSize(row.filesize_approx)}}</span>
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
<vxe-column field="vcodec" title="视频编码" width="120"></vxe-column>
|
|
<vxe-column field="vcodec" title="视频编码" width="120"></vxe-column>
|
|
@@ -178,7 +177,6 @@
|
|
finishModel: false,
|
|
finishModel: false,
|
|
|
|
|
|
loading: false,
|
|
loading: false,
|
|
-
|
|
|
|
/** 浏览器名称 **/
|
|
/** 浏览器名称 **/
|
|
videoBrowser: null,
|
|
videoBrowser: null,
|
|
loginBrowser: null, // 登录用的浏览器实例
|
|
loginBrowser: null, // 登录用的浏览器实例
|
|
@@ -284,6 +282,8 @@
|
|
}
|
|
}
|
|
await this.downloadImage(url, outputPath, item);
|
|
await this.downloadImage(url, outputPath, item);
|
|
item.loading = false;
|
|
item.loading = false;
|
|
|
|
+ this.$message({message: '恭喜你,下载已完成!', type: 'success'});
|
|
|
|
+ electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
|
|
return false;
|
|
return false;
|
|
}else{
|
|
}else{
|
|
let params = [
|
|
let params = [
|
|
@@ -295,6 +295,8 @@
|
|
this.formatUrl
|
|
this.formatUrl
|
|
];
|
|
];
|
|
item.status = '2';
|
|
item.status = '2';
|
|
|
|
+ item.loading = true;
|
|
|
|
+ this.$forceUpdate();
|
|
electronApi.spawnExec(['dlp.exe', ...params],{
|
|
electronApi.spawnExec(['dlp.exe', ...params],{
|
|
stdout:(data) =>{
|
|
stdout:(data) =>{
|
|
let str = data.toString();
|
|
let str = data.toString();
|
|
@@ -302,12 +304,13 @@
|
|
const res = regexDuration.exec(str);
|
|
const res = regexDuration.exec(str);
|
|
if(res && res[1]){
|
|
if(res && res[1]){
|
|
item.percent = res[1];
|
|
item.percent = res[1];
|
|
|
|
+ this.$forceUpdate();
|
|
}
|
|
}
|
|
- console.log('stdout', item.percent, '----', data.toString());
|
|
|
|
}
|
|
}
|
|
}).then(res => {
|
|
}).then(res => {
|
|
let outData = res.stdout ? res.stdout.toString() : '{}';
|
|
let outData = res.stdout ? res.stdout.toString() : '{}';
|
|
item.status = '3';
|
|
item.status = '3';
|
|
|
|
+ item.loading = false;
|
|
if(Number(this.usageTimes) >= 1){
|
|
if(Number(this.usageTimes) >= 1){
|
|
let data = Number(this.usageTimes) - 1;
|
|
let data = Number(this.usageTimes) - 1;
|
|
this.usageTimes -= 1;
|
|
this.usageTimes -= 1;
|
|
@@ -318,11 +321,11 @@
|
|
}else{
|
|
}else{
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
-
|
|
|
|
- console.log(this.videoList)
|
|
|
|
- console.log(outData);
|
|
|
|
|
|
+ this.$message({message: '恭喜你,下载已完成!', type: 'success'});
|
|
|
|
+ electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
|
|
}).catch(err =>{
|
|
}).catch(err =>{
|
|
item.status = '4';
|
|
item.status = '4';
|
|
|
|
+ item.loading = false;
|
|
console.log(err);
|
|
console.log(err);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -346,13 +349,6 @@
|
|
this.douyinParsing(formatUrl);
|
|
this.douyinParsing(formatUrl);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
-
|
|
|
|
- // const regex2 = /https:\/\/.*?.kuaishou.com/;
|
|
|
|
- // const res2 = regex2.exec(formatUrl);
|
|
|
|
- // if(res2 && res2.length > 0){ //其他视频解析,使用puputter
|
|
|
|
- // this.videoParsing(formatUrl);
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
|
|
|
|
this.parseLoading = true;
|
|
this.parseLoading = true;
|
|
this.tabLoading = true;
|
|
this.tabLoading = true;
|
|
@@ -375,7 +371,7 @@
|
|
}).catch(err =>{
|
|
}).catch(err =>{
|
|
this.parseLoading = false;
|
|
this.parseLoading = false;
|
|
this.tabLoading = false;
|
|
this.tabLoading = false;
|
|
- console.log('err1',err.stderr.toString());
|
|
|
|
|
|
+ // console.log('err1',err.stderr.toString());
|
|
let errStr = err.stderr.toString();
|
|
let errStr = err.stderr.toString();
|
|
if(errStr.indexOf('Unsupported URL') > -1){
|
|
if(errStr.indexOf('Unsupported URL') > -1){
|
|
this.videoParsing(formatUrl);
|
|
this.videoParsing(formatUrl);
|
|
@@ -634,7 +630,7 @@
|
|
setTimeout(()=> {
|
|
setTimeout(()=> {
|
|
this.parseLoading = false;
|
|
this.parseLoading = false;
|
|
this.tabLoading = false;
|
|
this.tabLoading = false;
|
|
- }, 20000)
|
|
|
|
|
|
+ }, 30000)
|
|
|
|
|
|
let userDataDir = os.tmpdir() + separator + 'chrome-data-capture-video';
|
|
let userDataDir = os.tmpdir() + separator + 'chrome-data-capture-video';
|
|
// 运行不同平台的浏览器
|
|
// 运行不同平台的浏览器
|
|
@@ -673,7 +669,7 @@
|
|
|
|
|
|
let vinfo = {
|
|
let vinfo = {
|
|
title: title,
|
|
title: title,
|
|
- tag: 'kuaishou',
|
|
|
|
|
|
+ tag: 'other',
|
|
format_id: 'default',
|
|
format_id: 'default',
|
|
ext: 'mp4',
|
|
ext: 'mp4',
|
|
resolution: '-',
|
|
resolution: '-',
|
|
@@ -755,6 +751,8 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
await page.close();
|
|
await page.close();
|
|
|
|
+ this.parseLoading = false;
|
|
|
|
+ this.tabLoading = false;
|
|
}
|
|
}
|
|
}, 600);
|
|
}, 600);
|
|
|
|
|
|
@@ -1254,4 +1252,33 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .c-titles{
|
|
|
|
+ background: -webkit-linear-gradient(left, #FF993F, #FFCE7C 25%, #FF9682 50%, #8e430d 75%, #FF993F);
|
|
|
|
+ color: transparent;
|
|
|
|
+ -webkit-background-clip: text;
|
|
|
|
+ background-size: 200% 100%;
|
|
|
|
+ animation: mask-ani 6s infinite linear;
|
|
|
|
+ font-size: 30px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ line-height: 1.5;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @-webkit-keyframes mask-ani {
|
|
|
|
+ 0% {
|
|
|
|
+ background-position: 0 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 50% {
|
|
|
|
+ background-position: 100% 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 100% {
|
|
|
|
+ background-position: 200% 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .soft-icon{
|
|
|
|
+ margin: 0 3px;
|
|
|
|
+ }
|
|
|
|
+
|
|
</style>
|
|
</style>
|