Learn R Programming

N2H4 (version 0.5.9)

getContentBody: Get Content body name.

Description

Get naver news body from link.

Usage

getContentBody(
  html_obj,
  body_node_info = "div#articleBodyContents",
  body_attr = ""
)

Arguments

html_obj

"xml_document" "xml_node" using read_html function.

body_node_info

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

body_attr

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

Value

Get character body content.

Examples

Run this code
# NOT RUN {
  print(news_url_ex)
  hobj <- xml2::read_html(news_url_ex)
  getContentBody(hobj)
  
# }

Run the code above in your browser using DataLab