I am attempting to webscrape the fixture list from this website
https://www.nrl.com/draw/?competition=111&round=1&season=2024
The output should be
Sea eagles, Rabbitohs
Roosters, Broncos
Knights, Raiders etc
I have written up the following code
url <- "https://www.nrl.com/draw/?competition=111&round=1&season=2024"
page <- read_html(url)
contentnodes <- page %>% html_nodes ("div.u-spacing-mt-24.pre-quench") %>%
html_attr("q-data") %>% jsonlite::fromJSON()
but I am getting the following error:
lexical error: invalid char in json text NA
Reading online some suggest the data is HTML rather than JSON but I have webscraped a different page on the same website with similar code so not entirely sure what has gone wrong here?