Reads the headings, paragraphs and list items of a saved page, in order, when no selector for its main content is known.
Value
A data.table with paragraph (order), block_type (tag),
block_class (class attribute), block_in_table and text, or NULL if
the file cannot be parsed.
See also
Other html:
html_paragraphs(),
html_text_or_na(),
prefer_html_text()
Examples
f <- tempfile(fileext = ".html")
writeLines("<body><h1>Title</h1><p class='x'>Text.</p></body>", f)
read_html_blocks(f)
#> paragraph block_type block_class block_in_table text
#> <int> <char> <char> <lgcl> <char>
#> 1: 1 h1 <NA> FALSE Title
#> 2: 2 p x FALSE Text.