首页 > 解决方案 > rvest 包的 read_html 问题

问题描述

我想为以下网址抓取数据:https ://es.wikipedia.org/wiki/Elecciones_a_la_Asamblea_de_Madrid_de_2021#Encuestas

我的代码如下:

html <- 'https://es.wikipedia.org/wiki/Elecciones_a_la_Asamblea_de_Madrid_de_2021#Encuestas' 

table <- read_html(html)

但是,当我打印表格时,它给了我一个“无效”的两个元素列表。有什么建议吗?

标签: rrvest

解决方案


推荐阅读