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

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

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

posted @ 2019-01-10 21:42  Mysterioushh  阅读(11867)  评论(2编辑  收藏  举报