I am trying to scrape data from the following site using Rvest but cannot get it to work. I am a new user, but have had luck with other sites, so I'm not sure what I am doing wrong here
https://www.actionnetwork.com/mlb/props/pitching
I have also tried using Power Query to get the data, which it was able to do successfully, so I'm hoping it should be possible through Rvest and I'm just missing something obvious.
These are the elements that Power Query selected and created a table with, if that helps:
"Column1", "TABLE.css-52x0f7.e1ppez710 > * > TR > :nth-child(1)"
"Column2", "TABLE.css-52x0f7.e1ppez710 > * > TR > :nth-child(2)"
"Column3", "TABLE.css-52x0f7.e1ppez710 > * > TR > :nth-child(3)"
Code:
url <- "https://www.actionnetwork.com/mlb/props/pitching
"
page <- read_html(url)
table <- page %>% html_nodes("table.css-52x0f7.e1ppez710") %>% html_table(fill = TRUE)
print(table)
Thank you
page <- read_html(url)
table <- page %>% html_nodes("table.css-52x0f7.e1ppez710") %>% html_table(fill = TRUE)
print(table)
I also tried getting the data through power query, which was successful in retrieving the columns