getContentDatetime: Get Content datetime

Description Usage Arguments Value Examples

View source: R/getContent.R

Description

Get naver news published datetime from link.

Usage

1
2
3
4
5
6
getContentDatetime(
  html_obj,
  datetime_node_info = "span.t11",
  datetime_attr = "",
  getEdittime = TRUE
)

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.

getEdittime

if TRUE, can get POSIXlt type datetime length 2 means published time and final edited time. if FALSE, get Date length 1.

Value

Get POSIXlt type datetime.

Examples

1
2
3
4
  print(news_url_ex)
  hobj <- xml2::read_html(news_url_ex)
  getContentDatetime(hobj)
  

N2H4 documentation built on July 10, 2021, 5:06 p.m.