1

I'm trying to extract the hrefs from this page: fincariz but for some reason when I use: html_read <- rvest::read_html('https://www.fincaraiz.com.co/apartamentos-casas/venta/medellin?usado=true&pagina=1')
I get:

[1]<head>\n<link rel="stylesheet" data-href="https://fonts.googleapis.com/css?family=Mulish:wght@400;500... [2] <body>\n<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NHBHMXK" height="0"...

For trying to extract the hrefs I use:

html_read %>%
      html_elements("div article a") %>%
      html_attr("href")

But I get no results and it seems that rvest did not extract the full html code that one's sees when inspecting the page with a web explorer.

Thanks in advance!

aquintero
  • 11
  • 1
  • 2
    It seems that the website is being generate with JavaScript, sou you'll probably need to use `rselenium`. Maybe [this post](https://stackoverflow.com/questions/63652388/r-rvest-cant-get-html-node) would shed you some light. – patL Sep 17 '21 at 15:45
  • 1
    @patL Indeed, with selenium I get the desired output with the html_code extracted. Was curious about the rvest only option. Thanks! – aquintero Sep 17 '21 at 16:30

0 Answers0