|
|
@ -10,7 +10,11 @@ class Kuaishou extends HeroBot { |
|
|
|
|
|
|
|
|
|
|
|
let options = { |
|
|
|
let options = { |
|
|
|
userAgent: configs.userAgent, |
|
|
|
userAgent: configs.userAgent, |
|
|
|
viewport: configs.viewport |
|
|
|
viewport: configs.viewport, |
|
|
|
|
|
|
|
showChrome: configs.showChrome, |
|
|
|
|
|
|
|
showChromeInteractions: configs.showChromeInteractions, |
|
|
|
|
|
|
|
showDevtools: configs.showDevtools, |
|
|
|
|
|
|
|
showChromeAlive: configs.showChromeAlive, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (this.heroServer) { |
|
|
|
if (this.heroServer) { |
|
|
@ -35,7 +39,7 @@ class Kuaishou extends HeroBot { |
|
|
|
//等待所有内容加载完成
|
|
|
|
//等待所有内容加载完成
|
|
|
|
const tab = await hero.activeTab; |
|
|
|
const tab = await hero.activeTab; |
|
|
|
await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
await hero.waitForPaintingStable(); |
|
|
|
await hero.waitForPaintingStable({timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
|
|
|
|
|
|
|
|
//解析网页HTML数据
|
|
|
|
//解析网页HTML数据
|
|
|
|
data.title = await hero.document.title; |
|
|
|
data.title = await hero.document.title; |
|
|
|