I would like to use R to webscrape the two tables from the following page
https://www.footywire.com/afl/footy/ft_match_statistics?mid=10751
I've tried the following using the package rvest but it doesnt work
temp <- "https://www.footywire.com/afl/footy/ft_match_statistics?mid=10751"
temp2 <- temp %>% read_html %>% html_node('match-statistics-team1-row') %>% html_table()
Does anyone know what should be in the html_node() part?
Thank you so much
As
match-statistics-team1-rowis theidof the element you want to select you have to add a#in front of it.Additionally I switched to
html_elementashtml_nodeis deprecated inrvest >= 1.0.0.