0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Generate → HTML Scraping

AI-generated

Overview

This node performs HTML scraping on a specified URL. It can extract either the full HTML content or just the text content from the webpage. This is useful for scenarios where you need to programmatically retrieve and process web page data, such as extracting information for data analysis, monitoring website changes, or automating content aggregation.

Use Case Examples

  1. Scraping product details from an e-commerce site by extracting HTML or text content.
  2. Extracting news article text from a news website for sentiment analysis.
  3. Retrieving and processing blog post content for content curation.

Properties

Name Meaning
Url The URL of the webpage to scrape. This is the target web address from which HTML or text content will be extracted.
Text Only A boolean flag indicating whether to return only the text content of the HTML page instead of the full HTML markup.
Code Variables Optional code variables that can be defined and used within the node's code editor for the selected function. These variables allow dynamic input values to be passed into the scraping logic.

Output

JSON

  • url - The URL that was scraped.
  • textOnly - Indicates if only text content was returned.
  • htmlContent - The full HTML content of the scraped webpage (if textOnly is false).
  • textContent - The extracted text content of the webpage (if textOnly is true).

Dependencies

  • Requires an API key credential for the CodeKit API to perform the scraping operation.

Troubleshooting

  • Ensure the URL is valid and accessible from the environment where the node runs.
  • If the node returns an error, check that the API key credential is correctly configured and has the necessary permissions.
  • If textOnly is set to true but the output is empty, verify that the webpage contains extractable text content.
  • Network issues or website restrictions (like CAPTCHAs or anti-scraping measures) may cause scraping to fail.

Discussion