使用selenium时,遇到element is not attached to the page document的解决方法

在爬取一些网站时,有时会提交网页,网页更新后但是页面元素没有连接成功

只需要使用webdriver.Chrome().refresh刷新一下网页就可以,还要在前面等待几秒钟再刷新,time.sleep(5)

原文地址:https://www.cnblogs.com/kevin-lee123/p/10252544.html