RSelenium으로 뉴스 헤드라인 수집
서비스를 제공하는 쪽에서 웹 크롤링을 차단을 하거나, 데이터가 동적으로 변하는 경우 기존 방법 대신에 RSelenium을 사용하면 손쉽게 데이터를 수집할 수 있다. Selenium 설치 방법은 추후 업데이트 예정 library(RSelenium) library(rvest) library(tidyverse) remDR % mutate(length = str_length(value)) %>% filter(length > 0) %>% select(-length) %>% rename(title = value) hd.url % html_nodes('.hdline_article_tit > a') %>% html_attr('href') %>% as.tibble %>% mutate(length = str_length(..
2019. 5. 6. 01:53