最近爬取一个网站时,遇到div 的CSS中overflow-y:hidden

关于隐藏元素的selenium爬取

 

 解决方法:

利用执行js,改变DIV 的CSS 属性

关于隐藏元素的selenium爬取

 

 然后,让屏幕向移动

 

js =js ="document.getElementById('frozen-west').style='overflow: scroll; position: relative; width: 1516px; height: 182px;'"
        browser.execute_script(js)

 

相关文章:

  • 2021-10-22
  • 2021-12-22
  • 2021-06-13
  • 2021-06-08
  • 2021-12-21
  • 2022-12-23
  • 2021-07-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-08-09
  • 2021-06-25
  • 2021-05-20
相关资源
相似解决方案