Can't extract url link with (html_attr("href")) function

Hi All!
I am new to R and I'm trying to scrape a website based on UAE. When I try to get a url link for each card title, it gives me an NA NA NA result.

Hoping someone can help me with this.

Thanks in advance everyone!!

website <-"https://houza.com/en/search?listingType=SALE&locations=abu-dhabi"
page <- read_html(website)

page %>% html_nodes(".list-card__title") %>%
  html_attr("href")

Hi and welcome the RStudio Community.

You may be looking in the wrong place for those link references. Is this what you want?

library(rvest) 

website <-"https://houza.com/en/search?listingType=SALE&locations=abu-dhabi"
page <- read_html(website)
page %>% 
  html_nodes(".list-card__content") %>%
  html_attr("href")
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.