Hi,
I am trying to extract links from a public webpages, however I can't figure out how to do it.
Here is the code I am using, and a picture of the lines I can see using the dev tools. The line starting with lig is wrong. How could I solve this issue?
list <- c("Resultados da pesquisa - Carta Social")
for (i in list){
link <- i
page <- read_html(link)
estabelecimento <- page %>% html_nodes(".equipment-title") %>% html_text()
fregloc <- page %>% html_nodes(".equipment-location") %>% html_text()
lig <- page %>% html_nodes(".equipment-location") %>% html_attr("href")
}
Thanks!