html_text_content.RdExtract text, title, description and language from HTML
html_text_content(html)A list with `text` (cleaned, lowercased), `title`, `description` and `lang`. Missing elements are `NA_character_`; `text` is `""` when nothing could be extracted.
[page_signals()], which uses this to decide whether a page is classifiable.
html <- "<html lang='en'><head><title>Example</title>
<meta name='description' content='A demo page'>
<script>ignored()</script></head>
<body><p>Hello World</p><style>p{}</style></body></html>"
html_text_content(html)
#> $text
#> [1] "hello world"
#>
#> $title
#> [1] "Example"
#>
#> $description
#> [1] "A demo page"
#>
#> $lang
#> [1] "en"
#>