Function parseHTML

  • Parses a string into an array of DOM nodes. The context argument has no meaning for Cheerio, but it is maintained for API compatibility with jQuery.

    Returns

    The parsed DOM.

    Alias

    Cheerio.parseHTML

    See

    https://api.jquery.com/jQuery.parseHTML/

    Parameters

    • this: CheerioAPI
    • data: string

      Markup that will be parsed.

    • Optional context: unknown

      Will be ignored. If it is a boolean it will be used as the value of keepScripts.

    • Optional keepScripts: boolean

      If false all scripts will be removed.

    Returns AnyNode[]

  • Parameters

    Returns null