|
@@ -192,6 +192,10 @@
|
|
|
<i class="el-icon-error" style="font-size: 16px; color: #ed4014;"></i>
|
|
|
<span>网络异常,请重试!</span>
|
|
|
</template>
|
|
|
+ <template v-if="row.status == '6'">
|
|
|
+ <i class="el-icon-error" style="font-size: 16px; color: #ed4014;"></i>
|
|
|
+ <span>验证码拦截,请手动验证!</span>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column title="操作" width="80">
|
|
@@ -959,16 +963,20 @@
|
|
|
let start = -1;
|
|
|
let scrollInt = setInterval(async() => {
|
|
|
start ++;
|
|
|
- num = await page.evaluate((start) => {
|
|
|
- let scrollHeight = document.body.scrollHeight;
|
|
|
- let cHeight = document.documentElement.clientHeight;
|
|
|
- let num = Math.ceil(scrollHeight / cHeight);
|
|
|
- window.scrollTo({
|
|
|
- top: cHeight * start,
|
|
|
- behavior: "smooth"
|
|
|
- });
|
|
|
- return num;
|
|
|
- }, start);
|
|
|
+ if(this.settingArr.indexOf('detailImg') > -1){
|
|
|
+ let scrollHeight2 = await page.evaluate((start) => {
|
|
|
+ let scrollHeight = document.body.scrollHeight;
|
|
|
+ let cHeight = document.documentElement.clientHeight;
|
|
|
+ // let num = Math.ceil(scrollHeight / cHeight);
|
|
|
+ window.scrollTo({
|
|
|
+ top: cHeight * start,
|
|
|
+ behavior: "smooth"
|
|
|
+ });
|
|
|
+ return scrollHeight;
|
|
|
+ }, start);
|
|
|
+ num = Math.ceil(scrollHeight2 / cHeight);
|
|
|
+ }
|
|
|
+
|
|
|
if(start > num || start > 200){ // 防止页面过长,滚动200次自动停止
|
|
|
urlInfo.status = '3';
|
|
|
clearInterval(scrollInt);
|
|
@@ -1454,6 +1462,7 @@
|
|
|
|
|
|
//鼠标放在主图第一张,生成视频
|
|
|
const elementHandle = await page.$('li[class*=thumbnail--]');
|
|
|
+
|
|
|
if(elementHandle){
|
|
|
const classListProperty = await elementHandle.getProperty('classList');
|
|
|
const classList = await classListProperty.jsonValue();
|
|
@@ -1464,23 +1473,43 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ let m1 = document.querySelectorAll('img[class^=PicGallery--thumbnailPic--]');
|
|
|
+ let m2 = document.querySelectorAll('img[class*=thumbnailPic--]');
|
|
|
+ if(document.querySelector('iframe') && m1.length == 0 && m2.length == 0){ // 出现弹窗而且没有主图,判断未拦截模式
|
|
|
+ await tbBrowser.close();
|
|
|
+ urlInfo.status = '6';
|
|
|
+ resolve(true);
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+
|
|
|
let scrollHeight = pageInfo.scrollHeight;
|
|
|
let cHeight = pageInfo.cHeight;
|
|
|
-
|
|
|
let num = Math.ceil(scrollHeight / cHeight);
|
|
|
let start = -1;
|
|
|
let scrollInt = setInterval(async() => {
|
|
|
start ++;
|
|
|
- num = await page.evaluate((start) => {
|
|
|
- let scrollHeight = document.body.scrollHeight;
|
|
|
- let cHeight = document.documentElement.clientHeight;
|
|
|
- let num = Math.ceil(scrollHeight / cHeight);
|
|
|
- window.scrollTo({
|
|
|
- top: cHeight * start,
|
|
|
- behavior: "smooth"
|
|
|
- });
|
|
|
- return num;
|
|
|
- }, start);
|
|
|
+ if(this.settingArr.indexOf('detailImg') > -1){
|
|
|
+ let scrollHeight2 = await page.evaluate((start) => {
|
|
|
+ let scrollHeight = document.body.scrollHeight;
|
|
|
+ let cHeight = document.documentElement.clientHeight;
|
|
|
+ let obj = document.getElementById('container') || document.getElementById('content');
|
|
|
+ if(obj && obj.getBoundingClientRect().bottom < 100){
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ window.scrollTo({
|
|
|
+ top: cHeight * start,
|
|
|
+ behavior: "smooth"
|
|
|
+ });
|
|
|
+ return scrollHeight;
|
|
|
+ }, start);
|
|
|
+
|
|
|
+ if(scrollHeight2 > 0){
|
|
|
+ num = Math.ceil(scrollHeight2 / cHeight);
|
|
|
+ }else{
|
|
|
+ num = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if(start > num || start > 200){ // 防止页面过长,滚动200次自动停止
|
|
|
urlInfo.status = '3';
|
|
|
clearInterval(scrollInt);
|