Learn R Programming

N2H4 (version 0.6.5)

getContentDatetime: Get Content datetime

Description

Get naver news published datetime from link.

Usage

getContentDatetime(
  html_obj,
  datetime_node_info = "span._ARTICLE_DATE_TIME",
  datetime_attr = "data-date-time"
)

Value

Get POSIXlt type datetime.

Arguments

html_obj

"xml_document" "xml_node" using read_html function.

datetime_node_info

Information about node names like tag with class or id. Default is "div.article_info h3" for naver news title.

datetime_attr

if you want to get attribution text, please write down here.

Examples

Run this code
if (FALSE) {
  hobj <- rvest::read_html("https://n.news.naver.com/mnews/article/214/0001195110?sid=103")
  getContentDatetime(hobj)
  }

Run the code above in your browser using DataLab