How to webscrap data if rvest functions don't work? (R)

筅森魡賤 提交于 2019-12-11 14:17:23

问题


I am trying to extract data from https://www.oneroof.co.nz/estimate/13c-caronia-crescent-lynfield-auckland-city-143867 . I would like to get estimated property value, rental price, floor area etc but failed to extract them.

I am using R and tried something like this but didn't work..

'https://www.oneroof.co.nz/estimate/13c-caronia-crescent-lynfield-auckland-city-143867' %>%
  read_html() %>%
  html_nodes(xpath = '//*[@id="app"]/div[1]/div[2]/div[2]/div[6]/div/div[3]/div[9]/div[2]/text()[1]') %>% html_text()

Can you please help me? If rvest doesn't work for this website, please let me know if POST or GET works. That would be much appreciated :)

来源:https://stackoverflow.com/questions/58970398/how-to-webscrap-data-if-rvest-functions-dont-work-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!