r – rvest unable to crawl text and html after using inspect element to check-ThrowExceptions

Exception or error:

I’m trying to crawl 2 things from this webpage:

url <- https://www.iproperty.com.sg/property/district-03/queens-peak/sale-14141722/

1) The facilities string

a <- read_html(url) %>% 
      html_nodes('div.feature-description-content.ListingFeatureDescription__FeatureDescriptionContent-dFVvWS.hPahWk') %>% 
      html_text()

But it gives me

{xml_nodeset (0)}

2) And the URL (https://www.iproperty.com.sg/property-agent/leen-ho-30613/) from this node:

a <- read_html(url) %>% html_nodes('h2.ContactFormstyle__FormTitle-bxPrOO.iFCeFd') %>% html_attr('href')

Also tried
a <- read_html(url) %>% html_nodes('h2.ContactFormstyle__FormTitle-bxPrOO.iFCeFd a') %>% html_attr('href')

Both gave me a nodeset of size 0.

Appreciate your kind assistance. (Is there any website / video that is comprehensive in teaching html_nodes , html_text and html_attr, like how to extract elements and other types of elements that I may not know?)

Also similar to Q1:

h2.contact-name.agent
div.contact-license
div.brand-name.BrandColorstyle__BrandNameWrapper-hXMAim.dAVmwh
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *