1

url - http://www.saramin.co.kr/zf_user/jobs/relay/view?view_type=list&rec_idx=35289352

I tried to scrape data from web(above url) using R.

When I execute codes below, it return "character(0)"

tmp <- "http://www.saramin.co.kr/zf_user/jobs/relay/view?view_type=list&rec_idx=35289352"
html <- read_html(tmp, encoding = 'utf-8')
txt <- html_nodes(html, "#content > div.wrap_recruit_view > div:nth-child(1) > div.rview_content > div.view_summary > div:nth-child(1) > div > ul.list_info.one > li") %>% html_text()
    
txt
#character(0)

I already read similar question from here but fail to solve my problem.

서한솔
  • 128
  • 1
  • 7
  • 1
    It seems that the contents after `#content > div.wrap_recruit_view` are dynamically added. If I'm not mistaken, `rvest` scrapes static webpages. Try `RSelenium`. See [this answer](https://stackoverflow.com/questions/45585575/webscraping-dynamic-pages-in-r) – R. Schifini Dec 19 '18 at 03:04
  • @R.Schifini Thank you for your advice! I'll try it. – 서한솔 Dec 19 '18 at 04:01

0 Answers0