I'm scraping this website. I'm specifically interested in extracting the content found in the last script node script node snippet. Thus far I have tried the following:
url <- "https://insolvencyinsider.ca/filing/"
ii <- read__html(url)
fwp <- ii %>%
htl_nodes("body") %>%
xml_find_first(xpath = "/script[15]") %>%
html_text() # Not text so I wouldn't expect this to work.
#> character (empty)
fwp <- ii %>%
htl_nodes("body") %>%
xml_find_first(xpath = "/script[15]") %>%
html_attr("window.FWP_JSON") # Don't think this makes sense since its not an attribute?
#> chr NA
