go-rod 设置等待,用js设置等待

 

 

 

page.MustWait(`() => {
window.astr = Array.from(document.querySelectorAll('#noResult > div > div > p:nth-child(3)')).map(
article=>article.innerHTML).join("\n");console.log(window.astr);

if (window.astr == ""){return true};

return window.astr.indexOf("We could not find any") > -1;}`)

 

posted @ 2023-02-13 18:18  AngDH  阅读(42)  评论(0编辑  收藏  举报