qiushang 4 months ago
parent
commit
3d5318f326

+ 3 - 3
nsis/test.nsi

@@ -1,16 +1,16 @@
 # ====================== 自定义宏 产品信息==============================
 !define PRODUCT_MID        		    "EkoFCqqaUJXy"
-!define PRODUCT_VERSION        		"2.0.2.0"
+!define PRODUCT_VERSION        		"2.0.3.0"
 !define PRODUCT_NAME           		"星优视频下载助手"
 !define INSTALL_OUTPUT_NAME    		"XYCaptureVideo_XY.exe" 
 !define EXE_NAME               		"XYCaptureVideo.exe"
 !define PRODUCT_PATHNAME           	"XYCaptureVideo"     #安装卸载项用到的KEY,注册表
 !define INSTALL_APPEND_PATH         "XYCaptureVideo"     #安装路径追加的名称 
-!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYCaptureVideo/lastest2.0.2.0.7z"
+!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYCaptureVideo/lastest2.0.3.0.7z"
 !define PRODUCT_PUBLISHER      	    "苏州星优办公软件有限公司"
 !define PRODUCT_LEGAL          	    "苏州星优办公软件有限公司"
 !define STATISTICS_url              "https://www.xingyousoft.com/api/index/user_log"   # 统计网址
-!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYCaptureVideo/uninstallWeb/?v=2.0.2.0"   # 接卸优惠网址
+!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYCaptureVideo/uninstallWeb/?v=2.0.3.0"   # 接卸优惠网址
 
 # ====================== 自定义宏 安装信息==============================
 !define INSTALL_7Z_NAME 	   		"app.7z"

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "XYCaptureVideo",
-	"version": "2.0.2.0",
+	"version": "2.0.3.0",
 	"author": "苏州星优办公软件有限公司",
 	"description": "An electron-vue project",
 	"license": "captureVideo",
@@ -11,7 +11,7 @@
 		"softMid": "EkoFCqqaUJXy",
 		"softName": "星优视频下载助手",
 		"copyright": "苏州星优办公软件有限公司",
-		"popupAdvId": "44",
+		"popupAdvId": "45",
 		"linkId": "46",
 		"upgradeLog": "1、修复了部分BUG</br>",
 		"downloadPrefix": "https://xy.xingyousoft.com/soft",

BIN
src/renderer/assets/image/haokan.png


+ 1 - 1
src/renderer/components/header.vue

@@ -79,7 +79,7 @@
 				</div>
 				<div class="font-12" style="padding: 20px; margin-bottom: 10px;">
 					<div style="text-align: center; margin-bottom: 10px;">
-						<p style="font-size: 16px;font-weight: 600;color: #f73131;">非VIP有3次免费下载机会</p>
+						<p style="font-size: 16px;font-weight: 600;color: #f73131;">非VIP可免费解析,下载视频需开通VIP使用</p>
 						<p style="font-size: 14px; font-weight: 600; margin-top: 15px;">开通会员即享以下权益</p>
 					</div>
 					<el-row :gutter="20" class="micon-list">

+ 28 - 52
src/renderer/components/home.vue

@@ -16,6 +16,7 @@
 									<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/haokan.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视频" />
@@ -43,7 +44,7 @@
 										视频信息:
 									</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>
 								<el-row type="flex" style="align-items: center;">
 									<div class="set-item">
@@ -153,7 +154,6 @@
 							<p class="m-title">{{tipsDesc}}</p>
 						</div>
 						<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>
 						</div>
 					</div>
@@ -202,7 +202,7 @@
 				selectIndex: 0,
 				usageTimes: 3,
 				tipsModal: false,
-				tipsDesc: "试用次数已经用完,请开通VIP会员使用。",
+				tipsDesc: "暂无下载权限,请开通VIP会员使用",
 				mergeModal: false,
 				bVideoInfo: {
 					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: {
 			
@@ -307,6 +297,7 @@
 				electronApi.call('showItemInfolder', [path + '\\tty.tty'])
 			},
 			openVip() {
+				this.tipsModal = false;
 				this.$refs.headerRef.openVip();
 			},
 			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 () => {
 					try{
 						if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-video')) {
@@ -432,6 +431,13 @@
 					const regex = /https:\/\/.*?.douyin.com/;
 					const res = regex.exec(formatUrl);
 					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);
 						return false;
 					}
@@ -486,24 +492,13 @@
 				let authority = this.$refs.headerRef.authority.isAuthority;
 				if (!authority && !flag) {
 					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;
 				}
 				
-				if(!authority && flag && this.usageTimes < 1){
+				if(!authority && flag){
 					this.tipsModal = true;
-					this.tipsDesc = '试用次数已经用完,请开通会员';
+					this.tipsDesc = '暂无下载权限,请开通VIP会员使用';
 					return false;
 				}
 				this.tipsModal = false;
@@ -528,16 +523,7 @@
 					
 					item.status = '2';
 					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);
 					item.loading = false;
 					this.$forceUpdate();
@@ -571,16 +557,6 @@
 						item.status = '3';
 						item.loading = false;
 						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'});
 						electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
 					}).catch(err =>{
@@ -660,9 +636,9 @@
 									}
 								}
 								
-								
 							});
 							await page.goto(url, {waitUntil : 'networkidle2'});
+							await page.waitForTimeout(1000);
 							await page.close();
 							
 							let arr = ['aweme_detail']; //'video' ,'play_addr', 'url_list', '2'];
@@ -670,7 +646,7 @@
 								responseObj = responseObj[arr[i]];
 							}
 							
-							if(responseObj.video && responseObj.video.play_addr){
+							if(responseObj && responseObj.video && responseObj.video.play_addr){
 								let vinfo = {
 									title: responseObj.preview_title,
 									tag: 'douyin',
@@ -687,7 +663,7 @@
 								}
 								this.videoList.push(vinfo);
 							}
-							if(responseObj.video && responseObj.video.play_addr_265){
+							if(responseObj && responseObj.video && responseObj.video.play_addr_265){
 								let vinfo = {
 									title: responseObj.preview_title,
 									tag: 'douyin',
@@ -704,7 +680,7 @@
 								}
 								this.videoList.push(vinfo);
 							}
-							if(responseObj.video && responseObj.video.play_addr_h264){
+							if(responseObj && responseObj.video && responseObj.video.play_addr_h264){
 								let vinfo = {
 									title: responseObj.preview_title,
 									tag: 'douyin',

+ 3 - 0
src/renderer/components/update.vue

@@ -77,6 +77,9 @@
 				<el-collapse-item title="2、快手或者抖音总是出现解析失败,没有数据显示" name="2">
 					<div>网址可能存在验证码需要手动滑动验证,在软件右上角菜单-软件设置,通过点击登录按钮调起软件内置谷歌浏览器,然后再浏览器中访问需要解析的网址,出现验证信息后手动验证通过即可。</div>
 				</el-collapse-item>
+				<el-collapse-item title="3、b站音视频合并的功能被禁用了" name="3">
+					<div>需解析b站视频网址,该功能即可启用</div>
+				</el-collapse-item>
 				<el-collapse-item v-for="(item, index) in questionArr" :key="index" :title="item.q" :name="item.no">
 					<div>{{item.a}}</div>
 				</el-collapse-item>