首页 > 解决方案 > 网页抓取。按“显示更多”按钮。“显示更多”按钮后面的标签是什么?

问题描述

我正在尝试抓取 Google Play 上的所有应用评论。问题是,在加载评论页面向下滚动 4 次后,会出现“显示更多”按钮,但我不知道如何按下它并再次运行 4 次,依此类推,直到到达页面底部。

 #scroll down 10 times, waiting for the page to load at each time
  for(i in 1:10){      
  remDr$executeScript(paste("scroll(0,",i*10000,");"))
  remDr$findElement(using = 'css selector', ".LkLjZd ScJHi OzU4dc")$clickElement()  
  Sys.sleep(5)    
  }

因为我不知道与“显示更多”按钮相关的 HTML 标签

这是我要按下的按钮的页面:https: //play.google.com/store/apps/details?id=com.nianticlabs.pokemongo&showAllReviews=true

标签: htmlcssrstudio

解决方案


推荐阅读