Learn R Programming

N2H4 (version 0.6.5)

getContentBody: Get Content body name.

Description

Get naver news body from link.

Usage

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

Value

Get character body content.

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.

Examples

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

Run the code above in your browser using DataLab