r - 网页抓取需要一段时间才能使用 R、rvest、Rslenium 加载的页面
问题描述
我正在尝试网页抓取页面https://sibdatabase.socialfinance.org.uk/并从 class="list" 中获取元素。
问题是,当我尝试使用 rvest 时,页面尚未加载:
library(rvest)
url <- "https://sibdatabase.socialfinance.org.uk/"
url %>%
read_html() %>%
html_nodes(".list")
输出是
{xml_nodeset (0)}
我也尝试了 RSelenium,但发生了错误:
library(RSelenium)
driver <- rsDriver()
remDr <- driver[["client"]]
remDr$navigate("https://sibdatabase.socialfinance.org.uk/")
Could not open chrome browser.
Client error message:
Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
Check server log for further details.
解决方案
推荐阅读
- java - 如何将序列化对象写入资源文件
- javascript - 根据对象数组中的键创建对象
- python - 0 False 和所有其他整数值 True 吗?
- javascript - 如何将一组坐标映射到 React Native Maps Markers?
- c# - “忘记电子邮件”功能不发送电子邮件
- c# - c# Binary Reader System.InvalidCastException:
- android - Ionic app 4 数据未在其他设备上加载
- c - 有冲突类型的问题
- ruby-on-rails - 无法检测到 rake 任务确保您可以对您的应用运行“$ bundle exec rake -P”
- python-3.x - 列出venv中所有虚拟环境的命令是什么?