html - 网页抓取。按“显示更多”按钮。“显示更多”按钮后面的标签是什么?
问题描述
我正在尝试抓取 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
解决方案
推荐阅读
- javascript - SweetAlert2 Typescript Webpack 构建错误
- amazon-web-services - 在 ECS 上部署时出现 MultipartException - Spring 1.5.15.RELEASE
- javascript - 将“navigator.mediaDevices.getUserMedia”替换为“canvas.captureStream”
- typescript - 如何在 TypeScript 中导出变量并填充?
- oracle - 尝试添加第三个联合时返回错误
- java - GSON MD5 和不匹配 - 如何计算 MD5?
- dafny - 在 openSUSE 飞跃 15.0 上安装 Dafny
- r - R,从分组数据框中提取列作为向量
- ruby-on-rails - Active Storage Rails 5.2.1 中的字节范围支持
- r - R:从每个基因的 t.test 中获取 p 值