class_docstr: Converts an HTML file to a Document.
  
  Usage example:
  ```python
  from haystack.components.converters.html import HTMLToDocument
  
  converter = HTMLToDocument()
  results = converter.run(sources=["sample.html"])
  documents = results["documents"]
  print(documents[0].content)
  # 'This is a text from the HTML file.'
  ```
docstr: Create an HTMLToDocument component.
  
  :param extractor_type: The type of boilerpy3 extractor to use. Defaults to `DefaultExtractor`.
    For more information on the different types of extractors,
    see [boilerpy3 documentation](https://github.com/jmriebold/BoilerPy3?tab=readme-ov-file#extractors).
docstr_tok: ["Create","an","HTMLToDocument","component",".",":","param","extractor_type",":","The","type","of","boilerpy3","extractor","to","use",".","Defaults","to","`","DefaultExtractor","`",".","For","more","information","on","the","different","types","of","extractors",",","see","[","boilerpy3","documentation","]","(","https",":","\/\/github.com\/jmriebold\/BoilerPy3","?","tab=readme-ov-file","#","extractors",")","."]
code: def __init__(
      self,
      extractor_type: Literal[
          "DefaultExtractor",
          "ArticleExtractor",
          "ArticleSentencesExtractor",
          "LargestContentExtractor",
          "CanolaExtractor",
          "KeepEverythingExtractor",
          "NumWordsRulesExtractor",
      ] = "DefaultExtractor",
  ):
      """
      Create an HTMLToDocument component.
  
      :param extractor_type: The type of boilerpy3 extractor to use. Defaults to `DefaultExtractor`.
        For more information on the different types of extractors,
        see [boilerpy3 documentation](https://github.com/jmriebold/BoilerPy3?tab=readme-ov-file#extractors).
      """
      self.extractor_type = extractor_type
  
file_path: haystack/haystack/components/converters/html.py
imports: import logging
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Union, Literal
  from boilerpy3 import extractors
  from haystack import Document, component
  from haystack.dataclasses import ByteStream
  from haystack.components.converters.utils import get_bytestream_from_source, normalize_metadata
label_desc: Use image node_id 1 to create a new HTMLToDocument object  with example: obj = HTMLToDocument(extractor_type)