I am looking to scrape publicly available descriptions of parcels of land in R using Rvest and V8. However, I am having a hard time getting past the JavaScript on the page as it is highly dynamic. This is the code I have so far:
GISurl <- "https://hosting.tighebond.com/plainfieldct_public/##info-address"
GIS <- read_html(GISurl)
owners <- GIS %>% html_nodes("div.owner") %>% html_text()
# Create a new v8 context
ct <- v8()
#parse the html content from the js output and print it as text
read_html(ct$eval(gsub('document.write','', owners))) %>% html_text()
I keep getting an error message that reads:
Error in context_eval(join(src), private$context, serialize) : ReferenceError: parcel is not defined.
To my understanding, the message is popping up because R doesn't know which parcel of land I'd like data from. How would I go about pulling data from ALL of the parcels (instead of specific pre-determined ones)?