![](https://velog.velcdn.com/images/xowen96/post/64b93bbf-8f4a-45eb-8b98-05d691de53b0/image.png)
![](https://velog.velcdn.com/images/xowen96/post/eee40eeb-baad-4cc2-910b-9f7f5a58e9de/image.png)
kr.investing_0526 <- c()
news_href <- c()
for (pageNo in 1) {
urls <- paste0("https://kr.investing.com/news/stock-market-news/",pageNo)
get_url <- GET(urls)
html_source <- read_html(get_url)
my_nodes <- html_nodes(html_source,".textDiv > a.title")
my_href <- html_attr(my_nodes,"href")
news_href <- paste0("https://kr.investing.com",my_href)
for (i in 1:36) {
T.selector <- paste0("#leftColumn > div.largeTitle > article:nth-child(",i,") > div.textDiv > a")
title_nodes <- html_nodes(html_source,T.selector)
text_title <- html_text(title_nodes)
kr.investing_0526 <- c(kr.investing_0526,text_title)
}
}
df <- data.frame(kr.investing_0526)
href_df <- data.frame(news_href)
df