diff --git a/bot/Bilibili.mjs b/bot/Bilibili.mjs index b323d45..47bc6d4 100644 --- a/bot/Bilibili.mjs +++ b/bot/Bilibili.mjs @@ -36,15 +36,8 @@ class Bilibili extends HeroBot { //等待所有内容加载完成 const tab = await hero.activeTab; - await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); - await hero.waitForState({ - all(assert) { - assert( - hero.document.title, - text => text != '', - ); - } - }, {timeoutMs: configs.heroTabOptions.timeoutMs}); + await tab.waitForLoad('DomContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); + await hero.waitForPaintingStable({timeoutMs: configs.heroTabOptions.timeoutMs}); //解析网页HTML数据 data.title = await hero.document.title; diff --git a/bot/Kuaishou.mjs b/bot/Kuaishou.mjs index 311a184..76bd3d2 100644 --- a/bot/Kuaishou.mjs +++ b/bot/Kuaishou.mjs @@ -36,7 +36,7 @@ class Kuaishou extends HeroBot { //等待所有内容加载完成 const tab = await hero.activeTab; - await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); + await tab.waitForLoad('DomContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); await hero.waitForPaintingStable({timeoutMs: configs.heroTabOptions.timeoutMs}); //解析网页HTML数据 diff --git a/bot/Xigua.mjs b/bot/Xigua.mjs index 4110279..6a4d8f6 100644 --- a/bot/Xigua.mjs +++ b/bot/Xigua.mjs @@ -36,7 +36,7 @@ class Xigua extends HeroBot { //等待所有内容加载完成 const tab = await hero.activeTab; - await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); + await tab.waitForLoad('DomContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); await hero.waitForPaintingStable({timeoutMs: configs.heroTabOptions.timeoutMs}); //解析网页HTML数据