I'm new to webscraping and I'm trying to scrape some data that results from a search function within a website. I'm using rvest to pull information and I'm not getting results. This is the website:
This is what I'm running:
URL <- 'https://www.encompassinsurance.com/agency-locator.aspx#PostalCode=21403&City=&StateProvCd=&Latitude=&Longitude='
webpage <- read_html(URL)
name_html <- html_nodes(webpage,'.locator_result_name')
name_data <- html_text(name_html)
When I run this code I get a response of: character(0)
I would like the response to be the name of each company as a result of the zipcode search (ex. "Townley-Kenton Insurance Agency", "Bradford Turner Insurance Group LLC").
I know there is some Javascript on this page and that I might be missing an important piece but given my limited knowdlge of html, CSS, javascript I'm not sure how to apply V8 or PhantomJS to make this work.
Appreciate any help.