qiushang 1 maand geleden
bovenliggende
commit
fde49f0d42

BIN
bin/cert/dlp.exe


BIN
bin/cert/dlp_x86.exe


BIN
bin/ia32/ffmpeg.exe


BIN
bin/ia32/ffplay.exe


BIN
bin/ia32/ffprobe.exe


+ 1 - 1
nsis/skin/uninstallpage.xml

@@ -3,7 +3,7 @@
    <VerticalLayout >
     <VerticalLayout width="570" height="314" bkimage="file='uninstall_bg1.png'">
 		<Control height="40" />
-		<WebBrowser height="264" width="550"  padding="10,0,0,0" name="oneclick_browser" homepage="https://xy.xingyousoft.com/soft/XYCaptureVideo/uninstallWeb/" autonavi="true"/>
+		<WebBrowser height="264" width="550"  padding="10,0,0,0" name="oneclick_browser" homepage="https://xy.xingyousoft.com/soft/XYLinks/uninstallWeb/" autonavi="true"/>
 	</VerticalLayout>
 	
 	<VerticalLayout bkimage="file='bgbottom.png' corner='10,0,10,10'" >

+ 7 - 7
nsis/test.nsi

@@ -1,16 +1,16 @@
 # ====================== 自定义宏 产品信息==============================
 !define PRODUCT_MID        		    "EkoFCqqaUJXy"
 !define PRODUCT_VERSION        		"2.1.0.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.1.0.0.7z"
+!define PRODUCT_NAME           		"星优链接复制器"
+!define INSTALL_OUTPUT_NAME    		"XYLinks_XY.exe" 
+!define EXE_NAME               		"XYLinks.exe"
+!define PRODUCT_PATHNAME           	"XYLinks"     #安装卸载项用到的KEY,注册表
+!define INSTALL_APPEND_PATH         "XYLinks"     #安装路径追加的名称 
+!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYLinks/lastest2.1.0.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.1.0.0"   # 接卸优惠网址
+!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYLinks/uninstallWeb/?v=2.1.0.0"   # 接卸优惠网址
 
 # ====================== 自定义宏 安装信息==============================
 !define INSTALL_7Z_NAME 	   		"app.7z"

+ 50 - 11
src/renderer/components/header.vue

@@ -80,7 +80,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可免费解析,下载视频需开通VIP使用</p>
+						<p style="font-size: 16px;font-weight: 600;color: #f73131;">非VIP平台链接仅下载前5条</p>
 						<p style="font-size: 14px; font-weight: 600; margin-top: 15px;">开通会员即享以下权益</p>
 					</div>
 					<el-row :gutter="20" class="micon-list">
@@ -153,7 +153,7 @@
 					</el-radio-group>
 				</el-row> -->
 				<el-row style="text-align: center; margin-top: 10px;">
-					<el-input size="small" v-model="chromePath" placeholder="请输入本地Chrome/Edge浏览器启动地址" clearable></el-input>
+					<el-input size="small" v-model="chromePath" placeholder="请输入本地Chrome/Microsoft Edge浏览器启动地址" clearable></el-input>
 					<div>
 						<el-link @click="chromeHelp('https://www.xingyousoft.com/news/detail/Z80IPpNVNNC1')" type="danger" style="text-decoration: underline; font-size: 12px;" :underline="false">查看如何输入地址</el-link>
 					</div>
@@ -177,7 +177,35 @@
 					</el-popover>
 				</el-divider>
 				<el-row style="text-align: center;">
-					<el-input-number v-model="gap" :min="1" :max="60" label="间隔时间" size="mini" style="margin-right: 5px;"></el-input-number>秒
+					间隔时间:<el-input-number v-model="gap" :min="5" :max="600" label="间隔时间" size="mini" style="margin-right: 5px;"></el-input-number>秒<i class="el-icon-info" style="visibility: hidden; margin-left: 15px"></i>
+					<div style="margin-top: 5px;">
+						随机范围:<el-input-number v-model="gapRandom" :min="1" :max="100" label="随机范围" size="mini" style="margin-right: 5px;"></el-input-number>秒
+						<el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="间隔时间为3s,随机范围为2s,最终任务执行时间为3s-5s内的整数值">
+							<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
+						</el-popover>
+					</div>
+				</el-row>
+				<el-divider content-position="left">
+					页面滚动速度
+					<el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="默认600ms,本地网路访问速度快可选择短时间,时间越长处理任务的时间也越长">
+						<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
+					</el-popover>
+				</el-divider>
+				<el-row style="text-align: center;">
+					<el-select v-model="pageMs" placeholder="请选择时间" size="mini" style="width: 100px; margin-right: 5px;">
+						<el-option :value="400"></el-option>
+						<el-option :value="500"></el-option>
+						<el-option :value="600"></el-option>
+						<el-option :value="700"></el-option>
+						<el-option :value="800"></el-option>
+						<el-option :value="900"></el-option>
+						<el-option :value="1000"></el-option>
+						<el-option :value="1200"></el-option>
+						<el-option :value="1400"></el-option>
+						<el-option :value="2000"></el-option>
+						<el-option :value="4000"></el-option>
+						<el-option :value="5000"></el-option>
+					</el-select>毫秒
 				</el-row>
 				<el-divider content-position="left">清理缓存</el-divider>
 				<el-row style="text-align: center;">
@@ -259,9 +287,10 @@
 				numType: 1,
 				isRemember:true,
 				versionType: 2,
-				chromeType: 2,
+				chromeType: 1,
 				chromePath: '',
 				gap: 5,
+				gapRandom: 2,
 				pageMs: 600,
 				//
 				productName: pjson.softInfo.softName,
@@ -330,14 +359,23 @@
 				this.userInfo = this.$utils.getStorage('userInfo');
 			}
 			
-			if(!this.$utils.getStorage('chromeType')){
+			if(!this.$utils.getStorage('chromePath')){
+				let flag = true;
 				for(let i = 0; i<this.edgePath.length; i++){
 					if (fs.existsSync(this.edgePath[i])) {
-						this.$utils.setStorage('chromeType', 1);
+						flag = false;
 						this.$utils.setStorage('chromePath', this.edgePath[i]);
 						break;
 					}
 				}
+				
+				if(flag){ // 当前电脑没有找到edge浏览器
+					this.$notify.error({
+						title: '提示',
+						message: '未扫描到Microsoft Edge浏览器地址,请手动在软件设置中配置浏览器地址,否则软件将无法使用!',
+						duration: 0
+					});
+				}
 			}
 			
 			window.addEventListener('message', e => {
@@ -412,13 +450,9 @@
 					this.cacheLoading = true;
 					let closeFlag = true;
 					setTimeout(() => {
-						let path1 = os.tmpdir() + '\\' + 'chrome-data-capture';
-						let path2 = os.tmpdir() + '\\' + 'chrome-data-capture-jd';
-						let path3 = os.tmpdir() + '\\' + 'chrome-data-capture-local';
+						let path1 = os.tmpdir() + '\\' + 'chrome-data-capture-local';
 						try{
 							this.deleteFolder(path1, false);
-							this.deleteFolder(path2, false);
-							this.deleteFolder(path3, false);
 						}catch(e){
 							this.cacheLoading = false;
 							if(e.toString().indexOf('operation not permitted') > -1){
@@ -558,6 +592,7 @@
 				this.$utils.setStorage('closeType', this.closeType);
 				this.$utils.setStorage('pageMs', this.pageMs);
 				this.$utils.setStorage('gap', this.gap);
+				this.$utils.setStorage('gapRandom', this.gapRandom);
 				this.$utils.setStorage('versionType', this.versionType);
 				this.$utils.setStorage('isRemember', true);
 				this.$utils.setStorage('chromeType', this.chromeType);
@@ -882,6 +917,7 @@
 					let closeType = this.$utils.getStorage('closeType');
 					let pageMs = this.$utils.getStorage('pageMs');
 					let gap = this.$utils.getStorage('gap');
+					let gapRandom = this.$utils.getStorage('gapRandom');
 					let versionType = this.$utils.getStorage('versionType');
 					let chromeType = this.$utils.getStorage('chromeType');
 					let chromePath = this.$utils.getStorage('chromePath');
@@ -894,6 +930,9 @@
 					if(gap){
 						this.gap = gap;
 					}
+					if(gapRandom){
+						this.gapRandom = gapRandom;
+					}
 					if(versionType){
 						this.versionType = versionType;
 					}

+ 330 - 702
src/renderer/components/home.vue

@@ -92,7 +92,7 @@
 								<el-button size="small" type="danger" @click="addLinks()" :loading="addLoading">开始提取</el-button>
 								<el-button size="small" type="danger" @click="pauseLinks()">停止提取</el-button>
 								<el-button size="small" type="danger" @click="clearList()">清除结果</el-button>
-								<el-button size="small" type="danger" @click="exportLinks()">合并导出全部</el-button>
+								<el-button size="small" type="danger" @click="exportLinks()" :loading="allLoading">合并导出全部</el-button>
 							</div>
 						</div>
 											
@@ -108,7 +108,7 @@
 								<vxe-table style="width: 100%;" 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="this[listStr+'List']" :scroll-y="{enabled: true}">
 									<vxe-column field="title" title="名称"></vxe-column>
-									<vxe-column field="page" title="页数">
+									<vxe-column field="page" title="页数" width="160">
 										<template #default="{ row }">
 											第{{row.currentPage}}页,共{{row.totalPage}}页
 										</template>
@@ -118,7 +118,7 @@
 											<span v-if="row.urls">{{row.urls.length}}</span>
 										</template>
 									</vxe-column>
-									<vxe-column field="status" title="状态" width="150">
+									<vxe-column field="status" title="状态" width="160">
 										<template #default="{ row }">
 											<template v-if="row.status == '1'">
 												<i class="el-icon-info" style="font-size: 16px; color: #999;"></i>
@@ -130,9 +130,10 @@
 											</template>
 										</template>
 									</vxe-column>
-									<vxe-column title="操作" width="150">
+									<vxe-column title="操作" width="160">
 										<template #default="{ row, rowIndex }">
-											<el-button :loading="row.loading" type="danger" size="mini" plain @click="exportPageLinks(row)">导出</el-button>
+											<el-button type="danger" size="mini" plain @click="delRow(rowIndex)">删除</el-button>
+											<el-button :loading="row.loading" size="mini" plain @click="exportPageLinks(row)">导出</el-button>
 										</template>
 									</vxe-column>
 								</vxe-table>
@@ -223,10 +224,7 @@
 				loginBrowser: null, // 登录用的浏览器实例
 				pauseFlag: true, //暂停中止标志
 				addLoading: false,
-				
-				videoBrowser: null,
-				parseLoading: false,
-				mergeLoading: false
+				allLoading: false,
 
 
 			};
@@ -254,13 +252,6 @@
 			if (!fs.existsSync(this.downloadDir + separator + pjson.softInfo.softName)) {
 				fs.mkdirSync(this.downloadDir + separator + pjson.softInfo.softName);
 			}
-			if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture')) {
-				fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture');
-			}
-			
-			if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-jd')) {
-				fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture-jd');
-			}
 			
 			if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-local')) {
 				fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture-local');
@@ -332,48 +323,42 @@
 			},
 			// 实时获取浏览器路径
 			initPath(){
-				let chromeType = this.$utils.getStorage('chromeType');
-				let chromePath = puppeteer.executablePath().replace('win32-1', 'win64-1');
-				if(chromeType == 1){ // 电脑自带浏览器
-					chromePath = this.$utils.getStorage('chromePath');
-				}else{
-					chromePath = puppeteer.executablePath().replace('win32-1', 'win64-1');
-					let versionType = this.$utils.getStorage('versionType');
-					if(versionType && versionType == 1){
-						chromePath = chromePath.replace('chrome-win', 'chrome7');
-					}
-				}
+				let chromePath = this.$utils.getStorage('chromePath');
 				return chromePath;
 			},
 			// 实时获取浏览器数据缓存
 			initDataDir(tag){
-				let chromeType = this.$utils.getStorage('chromeType');
-				let userDataDir = os.tmpdir() + separator + 'chrome-data-capture';
-				if(chromeType == 1){ // 电脑自带浏览器
-					userDataDir = os.tmpdir() + separator + 'chrome-data-capture-local';
-				}else{
-					userDataDir = os.tmpdir() + separator + 'chrome-data-capture';
-					if(tag == 'jd'){
-						userDataDir = os.tmpdir() + separator + 'chrome-data-capture-jd';
-					}
-				}
+				// let chromeType = this.$utils.getStorage('chromeType');
+				let userDataDir = os.tmpdir() + separator + 'chrome-data-capture-local';
+				// if(chromeType == 1){ // 电脑自带浏览器
+				// 	userDataDir = os.tmpdir() + separator + 'chrome-data-capture-local';
+				// }else{
+				// 	userDataDir = os.tmpdir() + separator + 'chrome-data-capture';
+				// 	if(tag == 'jd'){
+				// 		userDataDir = os.tmpdir() + separator + 'chrome-data-capture-jd';
+				// 	}
+				// }
 				return userDataDir;
 			},
 			// 任务下载间隔时间
 			initGap(){
 				let gap = this.$utils.getStorage('gap');
+				let gapRandom = this.$utils.getStorage('gapRandom');
 				if(gap){
-					return Number(gap);
+					let g = Number(gap);
+					let r = 0;
+					if(gapRandom){
+						r = Number(gapRandom) + 1;
+					}
+					let n = Math.floor(Math.random() * r) + g;
+					return n;
 				}else{
-					return 1;
+					return 5;
 				}
 			},
 			// 通用的延迟函数
-			async delay(t) {
+			async delay() {
 				let s = this.initGap();
-				if(t){
-					s = t;
-				}
 				if(s > 0){
 					return new Promise(resolve => setTimeout(resolve, Number(s)*1000));
 				}else{
@@ -414,16 +399,43 @@
 			},
 			// 清除缓存的后续操作
 			async clearCache(){
+				this.jdStatus = 3;
+				this.tbStatus = 3;
+				this.redStatus = 3;
+				this.alibabaStatus = 3;
+				
 				if(this.loginBrowser){
 					await this.loginBrowser.close();
 					this.loginBrowser = null;
 				}
 				
-				if(this.videoBrowser){
-					await this.videoBrowser.close();
-					this.videoBrowser = null;
+				for(let i = 0; i < listNameArr.length; i++){
+					if(listNameArr[i]){
+						if(this[listNameArr[i]+'Browser']){
+							await this[listNameArr[i]+'Browser'].close();
+							this[listNameArr[i]+'Browser'] = null;
+						}
+					}
 				}
 			},
+			// 删除一行数据
+			delRow(rowIndex){
+				let index = Number(this.menuIndex) - 1;
+				let type = listNameArr[index];
+				
+				this.$confirm('确认删除此行数据吗?', '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this[type+'List'].splice(rowIndex, 1);
+					if(this[type+'List'].length == 0) {
+						this.clearList();
+					}
+				}).catch(() => {
+						  
+				});
+			},
 			// 清除结果
 			clearList(){
 				let index = Number(this.menuIndex) - 1;
@@ -441,11 +453,16 @@
 					await this[browserName].close();
 					this[browserName] = null;
 				}
+				
+				this.$notify.info({
+					title: '提示',
+					message: '提取任务已停止执行'
+				});
 			},
 			//导出全部链接
 			exportLinks(){
 				let allRows = {
-					title: '淘宝商品链接汇总',
+					title: '商品链接汇总',
 					urls: [],
 					loading: false,
 					status: '1'
@@ -459,11 +476,7 @@
 						break;
 					case '3': // 天猫
 					case '4': // 淘宝
-						let allUrls = [];
-						for(let i = 0; i < this.tbList.length; i++){
-							allUrls = allUrls.concat(this.tbList[i].urls);
-						}
-						allRows.urls = allUrls;
+						allRows.title = '淘宝商品链接汇总';
 						break;
 					case '5': // 小红书
 						allRows.title = '小红书笔记链接汇总';
@@ -472,8 +485,19 @@
 						allRows.title = '网页链接汇总';
 						break;
 				}
-				
-				this.exportPageLinks(allRows);
+				let index = Number(this.menuIndex) - 1;
+				let allUrls = [];
+				if(this[listNameArr[index]+'List'].length > 0){
+					this.allLoading = true;
+					for(let i = 0; i < this[listNameArr[index]+'List'].length; i++){
+						allUrls = allUrls.concat(this[listNameArr[index]+'List'][i].urls);
+					}
+					allRows.urls = allUrls;
+					this.exportPageLinks(allRows);
+					setTimeout(() => {
+						this.allLoading = false;
+					}, 2000)
+				}
 			},
 			// 导出单页链接
 			exportPageLinks(row){
@@ -519,6 +543,13 @@
 			},
 			//提取链接
 			async addLinks(){
+				if(!this.formatUrl.trim()){
+					this.$notify.error({
+						title: '提示',
+						message: '请输入需要提取的网址'
+					});
+					return false;
+				}
 				this.addLoading = true;
 				setTimeout(() => {
 					this.addLoading = false;
@@ -542,6 +573,7 @@
 						});
 						if(this.alibabaStatus == 3){
 							this.loading = false;
+							this.addLoading = false;
 							return false;
 						}
 					}
@@ -559,6 +591,7 @@
 						});
 						if(this.jdStatus == 3){
 							this.loading = false;
+							this.addLoading = false;
 							return false;
 						}
 					}
@@ -577,6 +610,7 @@
 					}
 					if(this.tbStatus == 3){
 						this.loading = false;
+						this.addLoading = false;
 						return false;
 					}
 				}
@@ -593,6 +627,7 @@
 						});
 						if(this.redStatus == 3){
 							this.loading = false;
+							this.addLoading = false;
 							return false;
 						}
 					}
@@ -616,43 +651,37 @@
 					redSize = '--window-size=1920,800'; //给浏览器一个初始大小,在无头模式下,页面会自适用缩放
 				}
 				
-				try{
-					this[browserName] = await puppeteer.launch({
-						headless: headless,
-						executablePath: this.initPath(),
-						userDataDir: userDataDir, 
-						args: [
-							'--start-maximized',
-							'--no-sandbox',
-							'--disable-setuid-sandbox',
-							'--disable-blink-features=AutomationControlled',
-							redSize
-						]
-					});
-					
-					switch(this.menuIndex){
-						case '1': // 阿里巴巴
-							this.alibabaScanUrl(this.formatUrl);
-							break;
-						case '2': // 京东
-							this.jdScanUrl(this.formatUrl);
-							break;
-						case '3': // 天猫
-						case '4': // 淘宝
-							this.tbScanUrl(this.formatUrl);
-							break;
-						case '5': // 小红书
-							this.redScanUrl(this.formatUrl);
-							break;
-						case '10': // 普通网址
-							this.commonScanUrl(this.formatUrl);
-							break;
-					}
-				}catch(e){
-					console.log(e, '测试');
-				}
-				
+				this[browserName] = await puppeteer.launch({
+					headless: headless,
+					executablePath: this.initPath(),
+					userDataDir: userDataDir, 
+					args: [
+						'--start-maximized',
+						'--no-sandbox',
+						'--disable-setuid-sandbox',
+						'--disable-blink-features=AutomationControlled',
+						redSize
+					]
+				});
 				
+				switch(this.menuIndex){
+					case '1': // 阿里巴巴
+						this.alibabaScanUrl(this.formatUrl);
+						break;
+					case '2': // 京东
+						this.jdScanUrl(this.formatUrl);
+						break;
+					case '3': // 天猫
+					case '4': // 淘宝
+						this.tbScanUrl(this.formatUrl);
+						break;
+					case '5': // 小红书
+						this.redScanUrl(this.formatUrl);
+						break;
+					case '10': // 普通网址
+						this.commonScanUrl(this.formatUrl);
+						break;
+				}
 			},
 			
 			// 天猫/淘宝扫描网址
@@ -667,13 +696,7 @@
 						waitUntil = this.initDevelop().waitUntil;
 						await page.goto(url, {waitUntil : waitUntil});
 						
-						let searchTitle = await page.title() || '淘宝商品搜索';
-						if(searchTitle){
-							searchTitle = searchTitle.substring(0, 50);
-							if(this.containsAnyChar(searchTitle)){  //判断是否含有特殊字符
-								searchTitle = searchTitle.replace(/[\\/:*?"<>|#%&\s]/g, "");
-							}
-						}
+						let searchTitle = await this.getTitle(page, '淘宝商品搜索');
 						let outObj = {};
 						let pageHandle = await page.$$('[class^=next-pagination-display]');
 						let currentPage = 1;
@@ -748,7 +771,7 @@
 							}, authority, this.execNum, itemTitle);
 							
 							this.tbList.push(imgInfo);
-							await this.delay(5);
+							await this.delay();
 						}
 						
 						await this.tbBrowser.close();
@@ -767,20 +790,14 @@
 					try{
 						let authority = this.$refs.headerRef.authority.isAuthority;
 						let page = await this.alibabaBrowser.newPage();
+						let gapTime = Number(this.initGap()) * 1000;
 						
 						let responseVideo = [];
 						let waitUntil = 'networkidle2';
 						waitUntil = this.initDevelop().waitUntil;
 						await page.goto(url, {waitUntil : waitUntil});
 						
-						let searchTitle = await page.title() || '阿里巴巴商品搜索';
-						if(searchTitle){
-							searchTitle = searchTitle.substring(0, 50);
-							if(this.containsAnyChar(searchTitle)){  //判断是否含有特殊字符
-								searchTitle = searchTitle.replace(/[\\/:*?"<>|#%&\s]/g, "");
-							}
-						}
-						
+						let searchTitle = await this.getTitle(page, '阿里巴巴商品搜索');
 						//找页码信息
 						let outObj = {};
 						let pageHandle = await page.$$('[class^=pagination-container] span');
@@ -791,77 +808,7 @@
 							currentPage = await page.$eval('[class^=pagination-container] .fui-current', el => el.innerText);
 						}
 						
-						for(let i = Number(currentPage); i < Number(totalPage)+1; i++){
-							await new Promise(resolve => setTimeout(resolve, 1500)).then(async() => {
-								await page.evaluate(() => {
-									window.scrollTo({
-										top: 10000, 
-										behavior: "smooth" 
-									});
-								});
-							});
-							
-							await new Promise(resolve => setTimeout(resolve, 5000)).then(async() => {
-								let itemTitle = searchTitle + '-' + i;
-								const imgInfo = await page.evaluate((authority, execNum, itemTitle) => {
-									let outObj = {
-										title: itemTitle,
-										currentPage: 1,
-										totalPage: 1,
-										urls: [],
-										status: '1',
-										loading: false
-									};
-									let total = document.querySelector('[class^=pagination-container] span');
-									if(total){
-										outObj.currentPage = document.querySelector('[class^=pagination-container] .fui-current').innerText || 1;
-										outObj.totalPage = total.innerText || 1;
-									}
-									// 广告链接
-									// document.querySelectorAll('[class*=space-common-offerlist] a[class*=pc-ad]');
-									// 正常
-									let arr1 = document.querySelectorAll('[class*=space-common-offerlist] a[class*=search-offer-item]');
-									for(let i=0; i< arr1.length; i++){
-										let href = arr1[i].href;
-										let idData =  arr1[i].dataset.renderkey || '';
-										let length = idData.split('_').length - 1;
-										let id = idData.split('_')[length];
-										let title = arr1[i].querySelector('[class^=title-text]') ? arr1[i].querySelector('[class^=title-text]').innerText : '阿里巴巴商品'+new Date().getTime();
-										let priceText = arr1[i].querySelector('[class^=price-item]') ? arr1[i].querySelector('[class^=price-item]').innerText : '';
-										let price = priceText.replace('¥', '').replaceAll('\n', '');
-										let realDom = arr1[i].querySelector('.offer-price-row .offer-desc-item');
-										let realSales = realDom ? realDom.innerText : '';
-										let shopNameText = arr1[i].querySelector('[class^=offer-shop-row]') ? arr1[i].querySelector('[class^=offer-shop-row]').innerText : '';
-										let shopUrl = arr1[i].querySelector('[class^=offer-shop-row] a') ? arr1[i].querySelector('[class^=offer-shop-row] a').href : '';
-										let mainPic = arr1[i].querySelector('img[class^=main-img]') ? arr1[i].querySelector('img[class^=main-img]').src : '';
-										
-										let info = {
-											id: id,
-											title: title,
-											href: href,
-											price: price,
-											realSales: realSales,
-											shopNameText: shopNameText,
-											shopUrl: shopUrl,
-											mainPic: mainPic
-										}
-										outObj.urls.push(info);
-									}
-									let nextHandle = document.querySelector('.pagination-container .fui-next');
-									if(nextHandle){
-										nextHandle.click({force: true});
-									}
-									return outObj;
-								}, authority, this.execNum, itemTitle);
-								this.alibabaList.push(imgInfo);
-							});
-							
-						}
-						
-						await this.alibabaBrowser.close();
-						this.addLoading = false;
-							
-						
+						await this.initScroll('alibaba', page, Number(currentPage), Number(totalPage), searchTitle);
 					}catch(e){
 						this.addLoading = false;
 						this.showError(e);
@@ -875,20 +822,14 @@
 					try{
 						let authority = this.$refs.headerRef.authority.isAuthority;
 						let page = await this.jdBrowser.newPage();
+						let gapTime = Number(this.initGap()) * 1000;
 						
 						let responseVideo = [];
 						let waitUntil = 'networkidle2';
 						waitUntil = this.initDevelop().waitUntil;
 						await page.goto(url, {waitUntil : waitUntil});
 						
-						let searchTitle = await page.title() || '京东商品搜索';
-						if(searchTitle){
-							searchTitle = searchTitle.substring(0, 50);
-							if(this.containsAnyChar(searchTitle)){  //判断是否含有特殊字符
-								searchTitle = searchTitle.replace(/[\\/:*?"<>|#%&\s]/g, "");
-							}
-						}
-						
+						let searchTitle = await this.getTitle(page, '京东商品搜索');
 						//找页码信息
 						let outObj = {};
 						let pageHandle = await page.$$('[class*=quick-result]');
@@ -907,89 +848,7 @@
 								totalPage = totalInfo.replace('共', '').replace('页', '');
 							}
 						}
-						
-						for(let i = Number(currentPage); i < Number(totalPage)+1; i++){
-							await new Promise(resolve => setTimeout(resolve, 1500)).then(async() => {
-								await page.evaluate(() => {
-									window.scrollTo({
-										top: 8000, 
-										behavior: "smooth" 
-									});
-								});
-							});
-							
-							await new Promise(resolve => setTimeout(resolve, 5000)).then(async() => {
-								let itemTitle = searchTitle + '-' + i;
-								const imgInfo = await page.evaluate((authority, execNum, itemTitle) => {
-									let outObj = {
-										title: itemTitle,
-										currentPage: 1,
-										totalPage: 1,
-										urls: [],
-										status: '1',
-										loading: false
-									};
-									
-									let total = document.querySelector('[class*=quick-result]');
-									if(total){
-										let pageContent = total.innerText.replace('\n', '').replace('\n', '');
-										outObj.currentPage =pageContent.split('/')[0] || 1;
-										outObj.totalPage = pageContent.split('/')[1] || 1;
-									}else{
-										let currentDom = document.querySelector('[class*=pagination_center] [class*=active]');
-										if(currentDom){
-											outObj.currentPage = currentDom.innerText;
-										}
-										let totalInfo = document.querySelector('[class*=pagination_total]');
-										if(totalInfo){
-											utObj.totalPage = totalInfo.innerText.replace('共', '').replace('页', '');
-										}
-									}
-									// 正常
-									let arr1 = document.querySelectorAll('[class*=goodsContainer]>div');
-									for(let i=0; i< arr1.length; i++){
-										let sku = arr1[i].dataset.sku || '';
-										let title = arr1[i].querySelector('[class*=goods_title]') ? arr1[i].querySelector('[class*=goods_title]').innerText : '京东商品'+new Date().getTime();
-										let priceText = arr1[i].querySelector('[class*=price]') ? arr1[i].querySelector('[class*=price]').innerText : '';
-										let price = priceText.replace('¥', '').replaceAll('\n', '');
-										let realDom = arr1[i].querySelector('[class*=goods_volume]');
-										let realSales = realDom ? realDom.innerText : '';
-										let shopNameText = arr1[i].querySelector('[class*=shopFloor]') ? arr1[i].querySelector('[class*=shopFloor]').innerText : '';
-										let shopUrl = arr1[i].querySelector('[class*=shopFloor] a') ? arr1[i].querySelector('[class*=shopFloor] a').href : '';
-										let mainPic = arr1[i].querySelector('img') ? arr1[i].querySelector('img').src : '';
-										
-										let info = {
-											title: title,
-											id: sku,
-											href: "https://item.jd.com/" + sku + ".html",
-											price: price,
-											realSales: realSales,
-											shopNameText: shopNameText,
-											shopUrl: shopUrl,
-											mainPic: mainPic
-										}
-										outObj.urls.push(info);
-									}
-									let nextHandle = document.querySelectorAll('[class*=quick-result] [class*=quick-num]');
-									if(nextHandle && nextHandle.length > 0){
-										nextHandle[1].click({force: true});
-									}else{
-										nextHandle = document.querySelector('[class*=pagination_center] [class*=pagination_next]');
-										if(nextHandle && nextHandle.length > 0){
-											nextHandle.click({force: true});
-										}
-									}
-									return outObj;
-								}, authority, this.execNum, itemTitle);
-								this.jdList.push(imgInfo);
-							});
-							
-						}
-						
-						await this.jdBrowser.close();
-						this.addLoading = false;
-							
-						
+						await this.initScroll('jd', page, Number(currentPage), Number(totalPage), searchTitle);
 					}catch(e){
 						this.addLoading = false;
 						this.showError(e);
@@ -1009,14 +868,7 @@
 						waitUntil = this.initDevelop().waitUntil;
 						await page.goto(url, {waitUntil : waitUntil});
 						
-						let searchTitle = await page.title() || '小红书笔记';
-						if(searchTitle){
-							searchTitle = searchTitle.substring(0, 50);
-							if(this.containsAnyChar(searchTitle)){  //判断是否含有特殊字符
-								searchTitle = searchTitle.replace(/[\\/:*?"<>|#%&\s]/g, "");
-							}
-						}
-						
+						let searchTitle = await this.getTitle(page, '小红书笔记');
 						let pageInfo = await page.evaluate(() => {
 							let cHeight = document.documentElement.clientHeight;
 							let scrollHeight = document.body.scrollHeight;
@@ -1119,7 +971,6 @@
 				})();
 			},
 			
-			
 			// 普通扫描网址
 			commonScanUrl(url){
 				(async () => {
@@ -1132,7 +983,7 @@
 						waitUntil = this.initDevelop().waitUntil;
 						await page.goto(url, {waitUntil : waitUntil});
 						
-						let searchTitle = await page.title() || '网址链接';
+						let searchTitle = await this.getTitle(page, '网址链接');
 						if(searchTitle){
 							searchTitle = searchTitle.substring(0, 50);
 							if(this.containsAnyChar(searchTitle)){  //判断是否含有特殊字符
@@ -1225,6 +1076,199 @@
 				})();
 			},
 			
+			// 滚动到页面底部或者滚动次数固定
+			async initScroll(typeStr, page, currentPage, totalPage, searchTitle){
+				let pageInfo = await page.evaluate(() => {
+					let cHeight = document.documentElement.clientHeight;
+					let scrollHeight = document.body.scrollHeight;
+					return {'scrollHeight': scrollHeight, 'cHeight': cHeight}
+				});
+				
+				let scrollHeight = pageInfo.scrollHeight;
+				let cHeight = pageInfo.cHeight;
+				let num = Math.ceil(scrollHeight / cHeight);
+				let start = -1;
+				let scrollTime = this.initMs();
+				let scrollInt = setInterval(async() => {
+					if(this[typeStr+'Browser'] && !this[typeStr+'Browser'].isConnected()){
+						clearInterval(scrollInt);
+						await this[typeStr+'Browser'].close();
+						this[typeStr+'Browser'] = null;
+					}
+					start ++;
+					let scrollHeight = await page.evaluate((start) => {
+						let scrollHeight = document.body.scrollHeight;
+						let cHeight = document.documentElement.clientHeight;
+						window.scrollTo({
+							top: cHeight * start, 
+							behavior: "smooth" 
+						});
+						return scrollHeight;
+					}, start);
+					
+					if(scrollHeight > 0){
+						num = Math.ceil(scrollHeight / cHeight);
+					}else{
+						num = 0;
+					}
+					
+					if(start > num || start > 20){ //防止页面过长,滚动20次自动停止
+						clearInterval(scrollInt);
+						const imgInfo = await page.evaluate((searchTitle, typeStr) => {
+							let outObj = {
+								title: searchTitle,
+								currentPage: 1,
+								totalPage: 1,
+								urls: [],
+								status: '1',
+								loading: false
+							};
+							if(typeStr == 'alibaba'){ //阿里巴巴处理
+								let total = document.querySelector('[class^=pagination-container] span');
+								if(total){
+									outObj.currentPage = document.querySelector('[class^=pagination-container] .fui-current').innerText || 1;
+									outObj.totalPage = total.innerText || 1;
+									outObj.title = searchTitle + '-' + outObj.currentPage;
+								}
+								
+								// 正常
+								let arr1 = document.querySelectorAll('[class*=page-offerlist] a[class*=search-offer-item]');
+								for(let i=0; i< arr1.length; i++){
+									let href = arr1[i].href;
+									let idData =  arr1[i].dataset.renderkey || '';
+									let length = idData.split('_').length - 1;
+									let id = idData.split('_')[length];
+									let title = arr1[i].querySelector('[class^=title-text]') ? arr1[i].querySelector('[class^=title-text]').innerText : '阿里巴巴商品'+new Date().getTime();
+									let priceText = arr1[i].querySelector('[class^=price-item]') ? arr1[i].querySelector('[class^=price-item]').innerText : '';
+									let price = priceText.replace('¥', '').replaceAll('\n', '');
+									let realDom = arr1[i].querySelector('.offer-price-row .offer-desc-item');
+									let realSales = realDom ? realDom.innerText : '';
+									let shopNameText = arr1[i].querySelector('[class^=offer-shop-row]') ? arr1[i].querySelector('[class^=offer-shop-row]').innerText : '';
+									let shopUrl = arr1[i].querySelector('[class^=offer-shop-row] a') ? arr1[i].querySelector('[class^=offer-shop-row] a').href : '';
+									let mainPic = arr1[i].querySelector('img[class^=main-img]') ? arr1[i].querySelector('img[class^=main-img]').src : '';
+									
+									let info = {
+										id: id,
+										title: title,
+										href: href,
+										price: price,
+										realSales: realSales,
+										shopNameText: shopNameText,
+										shopUrl: shopUrl,
+										mainPic: mainPic
+									}
+									outObj.urls.push(info);
+								}
+								
+								// 广告链接
+								let arr2 = document.querySelectorAll('[class*=page-offerlist] div[class*=search-offer-wrapper]');
+								document.querySelectorAll('[class*=page-offerlist] a[class*=pc-ad]');
+								for(let j=0; j< arr2.length; j++){
+									let href = arr2[j].href;
+									let idData = arr2[j].dataset.renderkey || '';
+									let length = idData.split('_').length - 1;
+									let id = idData.split('_')[length];
+									let title = arr2[j].querySelector('[class^=title-text]') ? arr2[j].querySelector('[class^=title-text]').innerText : '阿里巴巴商品'+new Date().getTime();
+									let priceText = arr2[j].querySelector('[class^=price-item]') ? arr2[j].querySelector('[class^=price-item]').innerText : '';
+									let price = priceText.replace('¥', '').replaceAll('\n', '');
+									let realDom = arr2[j].querySelector('.offer-price-row .offer-desc-item');
+									let realSales = realDom ? realDom.innerText : '';
+									let shopNameText = arr2[j].querySelector('[class^=offer-shop-row]') ? arr2[j].querySelector('[class^=offer-shop-row]').innerText : '';
+									let shopUrl = arr2[j].querySelector('[class^=offer-shop-row] a') ? arr2[j].querySelector('[class^=offer-shop-row] a').href : '';
+									let mainPic = arr2[j].querySelector('img[class^=main-img]') ? arr2[j].querySelector('img[class^=main-img]').src : '';
+									
+									let info = {
+										id: id,
+										title: title,
+										href: href,
+										price: price,
+										realSales: realSales,
+										shopNameText: shopNameText,
+										shopUrl: shopUrl,
+										mainPic: mainPic
+									}
+									outObj.urls.push(info);
+								}
+								
+								let nextHandle = document.querySelector('.pagination-container .fui-next');
+								if(nextHandle){
+									nextHandle.click({force: true});
+								}
+							}
+							
+							if(typeStr == 'jd'){ //京东处理
+								let total = document.querySelector('[class*=quick-result]');
+								if(total){
+									let pageContent = total.innerText.replace('\n', '').replace('\n', '');
+									outObj.currentPage =pageContent.split('/')[0] || 1;
+									outObj.totalPage = pageContent.split('/')[1] || 1;
+									outObj.title = searchTitle + '-' + outObj.currentPage;
+								}else{
+									let currentDom = document.querySelector('[class*=pagination_center] [class*=active]');
+									if(currentDom){
+										outObj.currentPage = currentDom.innerText;
+										outObj.title = searchTitle + '-' + outObj.currentPage;
+									}
+									let totalInfo = document.querySelector('[class*=pagination_total]');
+									if(totalInfo){
+										utObj.totalPage = totalInfo.innerText.replace('共', '').replace('页', '');
+									}
+								}
+								// 正常
+								let arr1 = document.querySelectorAll('[class*=goodsContainer]>div');
+								for(let i=0; i< arr1.length; i++){
+									let sku = arr1[i].dataset.sku || '';
+									let title = arr1[i].querySelector('[class*=goods_title]') ? arr1[i].querySelector('[class*=goods_title]').innerText : '京东商品'+new Date().getTime();
+									let priceText = arr1[i].querySelector('[class*=price]') ? arr1[i].querySelector('[class*=price]').innerText : '';
+									let price = priceText.replace('¥', '').replaceAll('\n', '');
+									let realDom = arr1[i].querySelector('[class*=goods_volume]');
+									let realSales = realDom ? realDom.innerText : '';
+									let shopNameText = arr1[i].querySelector('[class*=shopFloor]') ? arr1[i].querySelector('[class*=shopFloor]').innerText : '';
+									let shopUrl = arr1[i].querySelector('[class*=shopFloor] a') ? arr1[i].querySelector('[class*=shopFloor] a').href : '';
+									let mainPic = arr1[i].querySelector('img') ? arr1[i].querySelector('img').src : '';
+									
+									let info = {
+										title: title,
+										id: sku,
+										href: "https://item.jd.com/" + sku + ".html",
+										price: price,
+										realSales: realSales,
+										shopNameText: shopNameText,
+										shopUrl: shopUrl,
+										mainPic: mainPic
+									}
+									outObj.urls.push(info);
+								}
+								let nextHandle = document.querySelectorAll('[class*=quick-result] [class*=quick-num]');
+								if(nextHandle && nextHandle.length > 0){
+									nextHandle[1].click({force: true});
+								}else{
+									nextHandle = document.querySelector('[class*=pagination_center] [class*=pagination_next]');
+									if(nextHandle && nextHandle.length > 0){
+										nextHandle.click({force: true});
+									}
+								}
+							}
+							
+							return outObj;
+						}, searchTitle, typeStr);
+						
+						this[typeStr+'List'].push(imgInfo);
+						currentPage = Number(imgInfo.currentPage);
+						totalPage = Number(imgInfo.totalPage);
+						if(currentPage < totalPage){
+							currentPage += 1;
+							await this.initScroll(typeStr, page, currentPage, totalPage, searchTitle);
+						}else{
+							await this[typeStr+'Browser'].close();
+							this[typeStr+'Browser'] = null;
+							this.addLoading = false;
+						}
+					}
+				}, scrollTime);
+			},
+			
+			
 			// 检查天猫淘宝登录状态
 			checkLogin(){
 				this.checkLoading = true;
@@ -1445,7 +1489,6 @@
 				});
 			},
 			
-			
 			// 去登录
 			loginUrl(url){
 				(async () => {
@@ -1454,12 +1497,6 @@
 						this.loginBrowser = null;
 					}
 					try{
-						if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture')) {
-							fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture');
-						}
-						if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-jd')) {
-							fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture-jd');
-						}
 						if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-local')) {
 							fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture-local');
 						}
@@ -1495,431 +1532,22 @@
 				})();
 			},
 	
-			// 开始解析
-			async startParsing(){
-				if(this.formatUrl.trim()){
-					let formatUrl = this.formatUrl.trim();
-					if(formatUrl.indexOf('http://') > -1){
-						formatUrl = formatUrl.replace('http://', 'https://');
-					}
-					
-					if(formatUrl.indexOf('https://') == -1){
-						this.$message.error('错了哦,请输入正确的视频地址(https://开头)');
-						return false;
-					}
-					let arr = formatUrl.split('https://');
-					formatUrl = 'https://' + arr[1];
-					this.downloadUrl = formatUrl;
-					
-					const regex = /https:\/\/.*?.douyin.com/;
-					const res = regex.exec(formatUrl);
-					this.bUrl = true;
-					if(res && res.length > 0){ //抖音视频解析,使用puputter
-						this.selectIndex = -1;
-						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.downloadUrl = formatUrl;
-						}
-						this.douyinParsing(formatUrl);
-						return false;
-					}
-					
-					this.parseLoading = true;
-					this.tabLoading = true;
-					this.selectIndex = -1;
-					this.videoList = [];
-					let userAgent = [];
-					let setingAgent = '';
-					if(formatUrl.indexOf('weibo.com/') > -1 && setingAgent){
-						userAgent = [
-							'--add-header',
-							'User-Agent:'+setingAgent,
-							'--add-header',
-							"Referer:https://weibo.com/"
-						];
-					}
-					let params = [
-						'--no-playlist',
-						'--dump-json',
-						...userAgent,
-						formatUrl
-					];
-					electronApi.spawnExec(['dlp.exe', ...params]).then(res => {
-						this.parseLoading = false;
-						this.tabLoading = false;
-						let info = res.stdout ? res.stdout.toString() : '{formats: []}';
-						this.videoInfo = JSON.parse(info);
-						this.videoList = this.videoInfo.formats || [];
-						const bregex = /https:\/\/.*?.bilibili.com/;
-						const bres = bregex.exec(formatUrl);
-						if(bres && bres.length > 0){ //b站的视频
-							this.bUrl = false;
-						}else{
-							this.bUrl = true;
-						}
-						this.biliAudioList = [];
-						this.biliAudioIndex = -1;
-						this.biliVideoList = [];
-						this.biliVideoIndex = -1;
-						this.videoList.map(item => {
-							item.title = this.videoInfo.title,
-							item.status = '1';
-							if(!this.bUrl){ // b站的视频
-								if(item.resolution.indexOf('audio') > -1 || item.audio_ext != 'none'){
-									this.biliAudioList.push(item);
-								}else{
-									this.biliVideoList.push(item);
-								}
-							}
-						})
-					}).catch(err =>{
-						this.parseLoading = false;
-						this.tabLoading = false;
-						// console.log('err1',err.stderr.toString());
-						let errStr = err.stderr.toString();
-						this.bUrl = true;
-						if(errStr.indexOf('Unsupported URL') > -1){
-							this.videoParsing(formatUrl);
-							return false;
-						}else if(formatUrl.indexOf('xiaohongshu.com/') > -1 && errStr.indexOf('No video formats') > -1){
-							this.$notify.error({
-								title: '设置中登录小红书账号下载!',
-								message: errStr
-							});
-							this.videoParsing(formatUrl);
-							return false;
-						}else{
-							this.$notify.error({
-								title: '网址解析失败!',
-								message: errStr
-							});
-						}
-					})
-				}
-			},
-			// 复制链接地址
-			copyText(text){
-				navigator.clipboard.writeText(text).then(() => {
-					this.$message({message: '视频下载链接已成功复制到剪贴板', type: 'success'});
-				}).catch(err => {
-					this.$message.error('无法复制文本', err.toString());
-				});
-			},
-			// 点击复制
-			copy(index){
-				this.commonUrl = '';
-				this.thunderUrl = [];
-				let tag = this.videoList[index].tag;
-				let urlList = this.videoList[index].urlList;
-				let title =  this.videoList[index].title;
-				let text = urlList[0];
-				if(urlList.length <= 0){
-					this.$message.error('无法复制下载地址');
-					return false;
-				}
-				if(tag == 'douyin'){
-					this.dyModal = true;
-					this.dyIndex = index;
-					
-					urlList.map(uitem => {
-						if(uitem.startsWith('https://www.douyin.com/')){
-							this.commonUrl = uitem;
-						}
-						if(!title){
-							title = '抖音视频';
-						}
-						// console.log(`AA`+uitem +`&filename=`+title+`.mp4ZZ`);
-						let urlBuffer = Buffer.from(`AA`+uitem +`&filename=`+title+`.mp4ZZ`).toString('base64');
-						this.thunderUrl.push('thunder://'+urlBuffer);
-					})
-				}else{
-					this.copyText(text);
-				}
-			},
-			
-			// 解析抖音视频
-			async douyinParsing(url){
-				if(this.loginBrowser){
-					await this.loginBrowser.close();
-					this.loginBrowser = null;
-				}
-				if(this.videoBrowser){
-					await this.videoBrowser.close();
-					this.videoBrowser = null;
-				}
-				if (!fs.existsSync(os.tmpdir() + separator + 'chrome-data-capture-video')) {
-					fs.mkdirSync(os.tmpdir() + separator + 'chrome-data-capture-video');
-				}
-				
-				this.parseLoading = true;
-				this.tabLoading = true;
-				
-				setTimeout(()=> {
-					this.parseLoading = false;
-					this.tabLoading = false;
-				}, 20000)
-				
-				let userDataDir = os.tmpdir() + separator + 'chrome-data-capture-video';
-				// 运行不同平台的浏览器
-				puppeteer.use(StealthPlugin());
-				let headless = true;
-				headless = this.initDevelop().headless;
-				this.videoBrowser = await puppeteer.launch({
-					headless: headless,
-					executablePath: this.initPath(),
-					userDataDir: userDataDir, 
-					args: [
-						'--start-maximized',
-						'--no-sandbox',
-						'--disable-setuid-sandbox',
-						'--disable-blink-features=AutomationControlled',
-					]
-				});
-				
-				await new Promise((resolve,reject) =>{
-					(async () => {
-						try{
-							let authority = this.$refs.headerRef.authority.isAuthority;
-							const page = await this.videoBrowser.newPage();
-							
-							let responseVideo = [];
-							let responseUrl = [];
-							let responseObj = {};
-							let vtitle = '视频';
-							page.on('response', async(response) => {
-								// 检查响应的 MIME 类型是否以 'video/' 开头
-								if (response.headers()['content-type'] && response.headers()['content-type'].startsWith('video/')) {
-									if(responseVideo.indexOf(response.url()) < 0 && !response.url().startsWith('blob:https://')){
-										responseVideo.push(response.url());
-										vtitle = await page.title();
-										if(vtitle){
-											vtitle = vtitle.substring(0, 50);
-											if(this.containsAnyChar(vtitle)){  //判断是否含有特殊字符
-												vtitle = vtitle.replace(/[\\/:*?"<>|#%&\s]/g, "");
-											}
-										}
-									}
-								}
-								if (response.headers()['content-type'] && response.headers()['content-type'].startsWith('application/json')) {
-									if(response.url().indexOf('/aweme/detail/') > -1){
-										if(responseUrl.indexOf(response.url()) < 0){
-											responseUrl.push(response.url());
-										}else{
-											return false;
-										}
-										
-										let jsonText = await response.text();
-										if(jsonText && typeof jsonText == 'string'){
-											responseObj = JSON.parse(jsonText);
-										}
-									}
-								}
-								
-							});
-							let waitUntil = 'networkidle2';
-							waitUntil = this.initDevelop().waitUntil;
-							await page.goto(url, {waitUntil : waitUntil});
-							await page.waitForTimeout(1000);
-							await this.videoBrowser.close();
-							
-							if(responseObj['aweme_detail']){ // 返回的接口数据中有aweme_detail参数 才会解析接口数据
-								let arr = ['aweme_detail']; //'video' ,'play_addr', 'url_list', '2'];
-								for(let i = 0; i < arr.length; i++){
-									responseObj = responseObj[arr[i]];
-								}
-								
-								if(responseObj && responseObj.preview_title){
-									responseObj.preview_title = responseObj.preview_title.substring(0, 50);
-									if(this.containsAnyChar(responseObj.preview_title)){  //判断是否含有特殊字符
-										responseObj.preview_title = responseObj.preview_title.replace(/[\\/:*?"<>|#%&\s]/g, "");
-									}
-								}
-								if(responseObj && responseObj.video && responseObj.video.play_addr){
-									let vinfo = {
-										title: responseObj.preview_title,
-										tag: 'douyin',
-										format_id: 'default',
-										ext: 'mp4',
-										resolution: responseObj.video.play_addr.width + 'x' + responseObj.video.play_addr.height,
-										fps: '-',
-										filesize: responseObj.video.play_addr.data_size, 
-										vcodec: '-',
-										acodec: '-',
-										urlList: responseObj.video.play_addr.url_list,
-										status: '1',
-										loading: false
-									}
-									this.videoList.push(vinfo);
-								}
-								if(responseObj && responseObj.video && responseObj.video.play_addr_265){
-									let vinfo = {
-										title: responseObj.preview_title,
-										tag: 'douyin',
-										format_id: 'play_addr_265',
-										ext: 'mp4',
-										resolution: responseObj.video.play_addr_265.width + 'x' + responseObj.video.play_addr_265.height,
-										fps: '-',
-										filesize: responseObj.video.play_addr_265.data_size,
-										vcodec: '-',
-										acodec: '-',
-										urlList: responseObj.video.play_addr_265.url_list,
-										status: '1',
-										loading: false
-									}
-									this.videoList.push(vinfo);
-								}
-								if(responseObj && responseObj.video && responseObj.video.play_addr_h264){
-									let vinfo = {
-										title: responseObj.preview_title,
-										tag: 'douyin',
-										format_id: 'play_addr_h264',
-										ext: 'mp4',
-										resolution: responseObj.video.play_addr_h264.width + 'x' + responseObj.video.play_addr_h264.height,
-										fps: '-',
-										filesize: responseObj.video.play_addr_h264.data_size,
-										vcodec: '-',
-										acodec: '-',
-										urlList: responseObj.video.play_addr_h264.url_list,
-										status: '1',
-										loading: false
-									}
-									this.videoList.push(vinfo);
-								}
-							}else if(responseVideo.length > 0){ //网页解析到视频地址
-								let vinfo = {
-									title: vtitle,
-									tag: 'douyin',
-									format_id: 'video',
-									ext: 'mp4',
-									resolution: '-',
-									fps: '-',
-									filesize: '',
-									vcodec: '-',
-									acodec: '-',
-									urlList: responseVideo,
-									status: '1',
-									loading: false
-								}
-								this.videoList.push(vinfo);
-							}
-							
-							
-							
-							this.parseLoading = false;
-							this.tabLoading = false;
-						}catch(e){
-							this.parseLoading = false;
-							this.tabLoading = false;
-							reject(e);
-							this.showError(e);
-						}
-					})();
-				});
-				
-			},
-			
-			// 下载网址链接的图片
-			async downloadImage(imageUrl, outputPath, urlInfo) {
-				let _this = this;
-				let received_bytes = 0;
-				let total_bytes = 0;
-				try {
-					let req = request({
-					    method: 'GET', uri: imageUrl, strictSSL: false
-					});
-					let out = fs.createWriteStream(outputPath);
-					req.pipe(out);
-					
-					return new Promise((resolve, reject) => { 
-						req.on('response', (data) => {
-							total_bytes = parseInt(data.headers['content-length']);
-							const status = data.statusCode;
-							if(this.menuIndex != '1'){
-								if (status < 200 || status >= 300) {
-									this.$notify.error({
-										title: '网络资源访问异常!- 1',
-										message: imageUrl.slice(0,50)
-									});
-								}else if(isNaN(total_bytes)){
-									this.$notify.error({
-										title: '网络资源访问异常!- 2',
-										message: imageUrl.slice(0,50)
-									});
-								}else{
-									// console.log('下载中...')
-								}
-							}
-							
-							if(status == 403 || isNaN(total_bytes)){
-								fs.unlinkSync(outputPath);
-								urlInfo.status = '4';
-							}
-							
-						});
-
-						req.on('data', (chunk) => {
-						    received_bytes += chunk.length;
-							if(urlInfo.filesize){
-								let size = Number(urlInfo.filesize);
-								let percent = Number(received_bytes / size * 100);
-								urlInfo.percent = percent.toFixed(2);
-								if(percent > 100){
-									urlInfo.percent = 100;
-								}
-								this.$forceUpdate();
-							}
-						});
-						
-						req.on('end', ()=> {
-							urlInfo.status = '3';
-							//console.log('下载完成', outputPath)
-							resolve(true);
-						});
-					});
-			    } catch (error) {  
-					urlInfo.status = '4';
-			        console.error(imageUrl, `Failed to download image: ${error.message}`);  
-			        throw error;  
-			    }  
-			},
-			
 			// 获取页面标题 - 生成对应的文件夹
-			async getTitle(page, urlInfo){
+			async getTitle(page, str){
 				// 已页面标题作为新建文件夹,保留前50个字
 				let title = await page.title();
 				if(title){
-					title = title.substring(0, 50);
-					if(this.containsAnyChar(title)){  //判断是否含有特殊字符
-						title = title.replace(/[\\/:*?"<>|#%&\s]/g, "");
-					}
-					if (fs.existsSync(this.downloadDir + separator + pjson.softInfo.softName + separator + title)) {
-						urlInfo.newPath = this.downloadDir + separator + pjson.softInfo.softName + separator + title;
-					} else {
-						fs.mkdirSync(this.downloadDir + separator + pjson.softInfo.softName + separator + title);
-						urlInfo.newPath = this.downloadDir + separator + pjson.softInfo.softName + separator + title;
+					title = title.substring(0, 50).trim();
+					if(this.containsAnyChar(title, ['\\', '/', ':', '*', '?', '"', '<', '>', '|', '.'])){  //判断是否含有特殊字符
+						title = title.replace(/[\\|/|:|*|?|.|"|<|>||]/g, "");
 					}
+					return title;
+				}else{
+					let t = str ? str : '网页无标题-' + new Date().getTime();
+					return t;
 				}
 			},
 			
-			// 下载base64位的图片
-			async downloadBaseImage(base64String, outputPath, urlInfo) {
-				const buffer = Buffer.from(base64String, 'base64');
-				const writeStream = fs.createWriteStream(outputPath);
-				writeStream.write(buffer);  
-				writeStream.end();
-				writeStream.on('finish', () => {
-					urlInfo.num += 1;
-				});
-				// 监听错误事件  
-				writeStream.on('error', (err) => {  
-					console.error('base64位写入文件时出错:', err);  
-				});
-			},
-			
 			// 错误提示
 			showError(e){
 				let str = '';

+ 7 - 10
src/renderer/components/update.vue

@@ -62,7 +62,7 @@
 				<p class="mian-title">2、使用风险与后果:</p>
 				<p>用户需自行承担因使用本软件而产生的所有风险和后果,包括但不限于下载失败、数据丢失、网站账号被封禁等。本软件不对任何因使用本软件而导致的直接或间接损失负责。<p>
 				<p class="mian-title">3、合理使用与道德约束:</p>
-				<p>用户从自己的个人中心或网址中提取视频,不得用于任何违法、不道德或侵犯他人权益的目的。在使用过程中,应控制访问频率,避免对目标网站服务器造成过大负荷,影响网站正常运营,请用户自觉遵守他人的知识产权,不要使用未经授权的图片、商标等。</p>
+				<p>用户从网址中提取链接,不得用于任何违法、不道德或侵犯他人权益的目的。在使用过程中,应控制访问频率,避免对目标网站服务器造成过大负荷,影响网站正常运营,请用户自觉遵守他人的知识产权,不要使用未经授权的图片、商标等。</p>
 				<p class="mian-title">4、免责条款:</p>
 				<p>在任何情况下,本软件开发商均不对因使用本软件而产生的任何损失承担责任,包括但不限于直接经济损失、商誉损失、数据丢失等。</p>
 			</div>
@@ -74,17 +74,14 @@
 		<!-- 常见问题 -->
 		<el-dialog title="常见问题" :visible.sync="questionVisible" width="700px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
 			<el-collapse accordion>
-				<el-collapse-item title="1、b站下载的视频没有声音如何解决" name="1">
-					<div>b站网址解析后,获得的视频和音频都是单独分开的,需使用软件中的B站音视频合并功能,分别上传对应的视频和音频文件,然后点击开始合并即可。</div>
+				<el-collapse-item title="1、提示未扫描到Microsoft Edge浏览器地址" name="1">
+					<div>软件功能基于Windows系统自带的Microsoft Edge浏览器,如果电脑中没有Edge浏览器,也可以安装谷歌浏览器,并在软件设置中配置浏览器地址。</div>
 				</el-collapse-item>
-				<el-collapse-item title="2、快手或者抖音总是出现解析失败,没有数据显示" name="2">
-					<div>网址可能存在验证码需要手动滑动验证,在软件右上角菜单-软件设置,通过点击登录按钮调起软件内置谷歌浏览器,然后再浏览器中访问需要解析的网址,出现验证信息后手动验证通过即可。</div>
+				<el-collapse-item title="2、软件设置中支持的浏览器有哪些?" name="2">
+					<div>仅支持谷歌浏览器/和基于Chromium的Microsoft Edge浏览器,win10系统自带Edge浏览器,win10以下系统可以安装谷歌浏览器使用。谷歌浏览器下载地址:https://www.google.cn/chrome/</div>
 				</el-collapse-item>
-				<el-collapse-item title="3、b站音视频合并的功能被禁用了" name="3">
-					<div>需解析b站视频网址,该功能即可启用</div>
-				</el-collapse-item>
-				<el-collapse-item title="4、点击下载后成功后文件不存在或者文件大小为0kb" name="4">
-					<div>点击复制,复制下载地址到浏览器下载或者复制迅雷下载地址使用迅雷下载</div>
+				<el-collapse-item title="3、为什么网址中的链接提取不到" name="3">
+					<div>目前仅能提取到平台搜索页面的链接,暂不支持店铺页面的链接</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>