|
@@ -16,6 +16,7 @@
|
|
<img src="../assets/image/weibo.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/kuaishou.png" class="soft-icon" title="快手" />
|
|
<img src="../assets/image/xiaohongshu.png" class="soft-icon" title="小红书" />
|
|
<img src="../assets/image/xiaohongshu.png" class="soft-icon" title="小红书" />
|
|
|
|
+ <img src="../assets/image/haokan.png" class="soft-icon" title="好看视频" />
|
|
<img src="../assets/image/bilibili.png" class="soft-icon" title="b站" />
|
|
<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/cctv.png" class="soft-icon" title="cctv" />
|
|
<img src="../assets/image/56.png" class="soft-icon" title="56视频" />
|
|
<img src="../assets/image/56.png" class="soft-icon" title="56视频" />
|
|
@@ -43,7 +44,7 @@
|
|
视频信息:
|
|
视频信息:
|
|
</h4>
|
|
</h4>
|
|
|
|
|
|
- <el-button @click="mergeClick()" size="small" :disabled="bUrl">B站音视频合并</el-button>
|
|
|
|
|
|
+ <el-button @click="mergeClick()" size="small" :disabled="bUrl" title="解析B站网址后启用">B站音视频合并</el-button>
|
|
</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">
|
|
@@ -153,7 +154,6 @@
|
|
<p class="m-title">{{tipsDesc}}</p>
|
|
<p class="m-title">{{tipsDesc}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="member-btn">
|
|
<div class="member-btn">
|
|
- <el-button size="small" style="margin:0 10px;" @click="downloadVideo(selectIndex, true)" round v-if="usageTimes > 0">继续试用</el-button>
|
|
|
|
<el-button size="small" round type="primary" @click="openVip()">开通会员</el-button>
|
|
<el-button size="small" round type="primary" @click="openVip()">开通会员</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -202,7 +202,7 @@
|
|
selectIndex: 0,
|
|
selectIndex: 0,
|
|
usageTimes: 3,
|
|
usageTimes: 3,
|
|
tipsModal: false,
|
|
tipsModal: false,
|
|
- tipsDesc: "试用次数已经用完,请开通VIP会员使用。",
|
|
|
|
|
|
+ tipsDesc: "暂无下载权限,请开通VIP会员使用",
|
|
mergeModal: false,
|
|
mergeModal: false,
|
|
bVideoInfo: {
|
|
bVideoInfo: {
|
|
videoPath: '',
|
|
videoPath: '',
|
|
@@ -264,16 +264,6 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
- let name = pjson.softInfo.softMid + pjson.name;
|
|
|
|
- fs.stat(os.tmpdir() + separator + name, (err, stats) => {
|
|
|
|
- if(!stats){
|
|
|
|
- let data = 3;
|
|
|
|
- fs.writeFile(os.tmpdir() + separator + name, data, (err) => {
|
|
|
|
- if (err) throw err;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
@@ -307,6 +297,7 @@
|
|
electronApi.call('showItemInfolder', [path + '\\tty.tty'])
|
|
electronApi.call('showItemInfolder', [path + '\\tty.tty'])
|
|
},
|
|
},
|
|
openVip() {
|
|
openVip() {
|
|
|
|
+ this.tipsModal = false;
|
|
this.$refs.headerRef.openVip();
|
|
this.$refs.headerRef.openVip();
|
|
},
|
|
},
|
|
updateSoft() {
|
|
updateSoft() {
|
|
@@ -326,7 +317,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
// 去登录
|
|
// 去登录
|
|
- loginUrl(url){
|
|
|
|
|
|
+ async loginUrl(url){
|
|
|
|
+ if(this.loginBrowser){
|
|
|
|
+ await this.loginBrowser.close();
|
|
|
|
+ this.loginBrowser = null;
|
|
|
|
+ }
|
|
|
|
+ if(this.videoBrowser){
|
|
|
|
+ await this.videoBrowser.close();
|
|
|
|
+ this.videoBrowser = null;
|
|
|
|
+ }
|
|
(async () => {
|
|
(async () => {
|
|
try{
|
|
try{
|
|
if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-video')) {
|
|
if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-video')) {
|
|
@@ -432,6 +431,13 @@
|
|
const regex = /https:\/\/.*?.douyin.com/;
|
|
const regex = /https:\/\/.*?.douyin.com/;
|
|
const res = regex.exec(formatUrl);
|
|
const res = regex.exec(formatUrl);
|
|
if(res && res.length > 0){ //抖音视频解析,使用puputter
|
|
if(res && res.length > 0){ //抖音视频解析,使用puputter
|
|
|
|
+ this.videoList = [];
|
|
|
|
+ let reg2 = /[?&]modal_id=(\w+)/;
|
|
|
|
+ let res2 = reg2.exec(formatUrl);
|
|
|
|
+ if(res2){
|
|
|
|
+ let modal_id = res2[1];
|
|
|
|
+ formatUrl = res[0] + '/video/'+modal_id;
|
|
|
|
+ }
|
|
this.douyinParsing(formatUrl);
|
|
this.douyinParsing(formatUrl);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -486,24 +492,13 @@
|
|
let authority = this.$refs.headerRef.authority.isAuthority;
|
|
let authority = this.$refs.headerRef.authority.isAuthority;
|
|
if (!authority && !flag) {
|
|
if (!authority && !flag) {
|
|
this.tipsModal = true;
|
|
this.tipsModal = true;
|
|
- let name = pjson.softInfo.softMid + pjson.name;
|
|
|
|
- fs.readFile(os.tmpdir() + separator + name, (err, data) => {
|
|
|
|
- if (err) throw err;
|
|
|
|
- let num = data.toString();
|
|
|
|
- if(['1','2','3'].indexOf(num) > -1){
|
|
|
|
- this.usageTimes = Number(num);
|
|
|
|
- this.tipsDesc = '您共有3次试用机会,目前剩余'+this.usageTimes+'次';
|
|
|
|
- }else{
|
|
|
|
- this.usageTimes = 0;
|
|
|
|
- this.tipsDesc = '试用次数已经用完,请开通会员使用';
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ this.tipsDesc = '暂无下载权限,请开通VIP会员使用';
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- if(!authority && flag && this.usageTimes < 1){
|
|
|
|
|
|
+ if(!authority && flag){
|
|
this.tipsModal = true;
|
|
this.tipsModal = true;
|
|
- this.tipsDesc = '试用次数已经用完,请开通会员';
|
|
|
|
|
|
+ this.tipsDesc = '暂无下载权限,请开通VIP会员使用';
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
this.tipsModal = false;
|
|
this.tipsModal = false;
|
|
@@ -528,16 +523,7 @@
|
|
|
|
|
|
item.status = '2';
|
|
item.status = '2';
|
|
item.loading = true;
|
|
item.loading = true;
|
|
- if(Number(this.usageTimes) >= 1){
|
|
|
|
- let data = Number(this.usageTimes) - 1;
|
|
|
|
- this.usageTimes -= 1;
|
|
|
|
- let name = pjson.softInfo.softMid + pjson.name;
|
|
|
|
- fs.writeFile(os.tmpdir() + separator + name, data, (err) => {
|
|
|
|
- if (err) throw err;
|
|
|
|
- });
|
|
|
|
- }else{
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
await this.downloadImage(url, outputPath, item);
|
|
await this.downloadImage(url, outputPath, item);
|
|
item.loading = false;
|
|
item.loading = false;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
@@ -571,16 +557,6 @@
|
|
item.status = '3';
|
|
item.status = '3';
|
|
item.loading = false;
|
|
item.loading = false;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
- if(Number(this.usageTimes) >= 1){
|
|
|
|
- let data = Number(this.usageTimes) - 1;
|
|
|
|
- this.usageTimes -= 1;
|
|
|
|
- let name = pjson.softInfo.softMid + pjson.name;
|
|
|
|
- fs.writeFile(os.tmpdir() + separator + name, data, (err) => {
|
|
|
|
- if (err) throw err;
|
|
|
|
- });
|
|
|
|
- }else{
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
this.$message({message: '恭喜你,下载已完成!', type: 'success'});
|
|
this.$message({message: '恭喜你,下载已完成!', type: 'success'});
|
|
electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
|
|
electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
|
|
}).catch(err =>{
|
|
}).catch(err =>{
|
|
@@ -660,9 +636,9 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
});
|
|
});
|
|
await page.goto(url, {waitUntil : 'networkidle2'});
|
|
await page.goto(url, {waitUntil : 'networkidle2'});
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
await page.close();
|
|
await page.close();
|
|
|
|
|
|
let arr = ['aweme_detail']; //'video' ,'play_addr', 'url_list', '2'];
|
|
let arr = ['aweme_detail']; //'video' ,'play_addr', 'url_list', '2'];
|
|
@@ -670,7 +646,7 @@
|
|
responseObj = responseObj[arr[i]];
|
|
responseObj = responseObj[arr[i]];
|
|
}
|
|
}
|
|
|
|
|
|
- if(responseObj.video && responseObj.video.play_addr){
|
|
|
|
|
|
+ if(responseObj && responseObj.video && responseObj.video.play_addr){
|
|
let vinfo = {
|
|
let vinfo = {
|
|
title: responseObj.preview_title,
|
|
title: responseObj.preview_title,
|
|
tag: 'douyin',
|
|
tag: 'douyin',
|
|
@@ -687,7 +663,7 @@
|
|
}
|
|
}
|
|
this.videoList.push(vinfo);
|
|
this.videoList.push(vinfo);
|
|
}
|
|
}
|
|
- if(responseObj.video && responseObj.video.play_addr_265){
|
|
|
|
|
|
+ if(responseObj && responseObj.video && responseObj.video.play_addr_265){
|
|
let vinfo = {
|
|
let vinfo = {
|
|
title: responseObj.preview_title,
|
|
title: responseObj.preview_title,
|
|
tag: 'douyin',
|
|
tag: 'douyin',
|
|
@@ -704,7 +680,7 @@
|
|
}
|
|
}
|
|
this.videoList.push(vinfo);
|
|
this.videoList.push(vinfo);
|
|
}
|
|
}
|
|
- if(responseObj.video && responseObj.video.play_addr_h264){
|
|
|
|
|
|
+ if(responseObj && responseObj.video && responseObj.video.play_addr_h264){
|
|
let vinfo = {
|
|
let vinfo = {
|
|
title: responseObj.preview_title,
|
|
title: responseObj.preview_title,
|
|
tag: 'douyin',
|
|
tag: 'douyin',
|