0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Operator → Parse HTML Content

AI-generated

Overview

The node provides a utility to parse HTML content and extract specific elements using CSS selectors. This is useful in scenarios where you need to programmatically retrieve parts of an HTML document, such as scraping data from web pages, extracting headings, links, or any other elements identified by CSS selectors.

For example, you can input raw HTML code and specify a selector like h1 to get all heading elements, or .class-name to get elements with a certain class. This allows automation workflows to process and analyze HTML content without manual intervention.

Properties

Name Meaning
HTML Content The raw HTML string to be parsed.
CSS Selector A CSS selector string used to target specific elements within the HTML content (e.g., h1, .class-name, #ID-name).

Output

The node outputs JSON data containing the extracted elements matching the CSS selector from the provided HTML content. The structure typically includes the matched elements' text or HTML content depending on implementation details.

If binary data output is supported (not explicitly shown here), it would represent extracted content in a binary form, but this node primarily deals with textual HTML parsing results.

Dependencies

  • Requires an API key credential for authentication to an external service at https://prod.0codekit.com.
  • The node sends a POST request to /operator/htmlparserget endpoint with the HTML content and CSS selector.
  • No additional local dependencies are indicated; relies on the external 0CodeKit API service.

Troubleshooting

  • Empty or no results: Ensure the HTML content is valid and the CSS selector correctly targets existing elements.
  • Invalid HTML input: Malformed HTML may cause parsing errors or unexpected results.
  • Authentication errors: Verify that the API key credential is correctly configured and has access rights.
  • Network issues: Check connectivity to the external API endpoint.
  • Selector syntax errors: Incorrect CSS selector syntax will result in no matches or errors.

Links and References

Discussion