Actions114
- AI Actions
- AI Advanced OCR
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Enitity Detection
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate Javascript Code
- Generate Python Code
- Language Detection
- Mood Detection
- PDF OCR
- Picture Object Recognition
- Picture Text Recognition
- Redact Sensitive Information From PDF
- Too Long To Read
- Transcribe
- Translation
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Operator → HTML Parser
AI-generatedOverview
This node performs HTML parsing operations within the 'Operator' resource. It allows users to extract HTML content from a specified URL or directly from an HTML string. Users can specify CSS selectors, tag selectors, class selectors, or ID selectors to target specific elements within the HTML. The node can return either the first matching element or all elements that satisfy the query, making it useful for web scraping, data extraction, and content analysis tasks.
Use Case Examples
- Extract all paragraph elements from a webpage by specifying the URL and the tag selector 'p'.
- Parse an HTML string to retrieve elements with a specific class name.
- Use a CSS selector to extract all elements matching a complex query from a website's HTML content.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Defines variables that can be used within the code editor for the selected function, allowing dynamic input values. |
| Url | The URL of the website from which to extract the HTML content. |
| Html | An HTML string that can be directly passed instead of a URL to extract content. |
| All | Determines whether to return all elements matching the query (true) or only the first element (false). |
| Selector | A CSS selector string that overrides tagSelector, classSelector, and idSelector to specify elements to extract. |
| Tag Selector | The tag name of elements to extract, such as 'p' or 'div'. |
| Class Selector | The class name of elements to extract. |
| ID Selector | The ID of the element to extract. |
Output
JSON
extractedElements- The extracted HTML elements matching the specified selectors, either as a single element or an array of elements depending on the 'All' property.
Dependencies
- Requires an API key credential for the CodeKit API to perform the HTML parsing request.
Troubleshooting
- If no elements are returned, verify that the URL or HTML string is correct and accessible.
- Ensure the CSS selector or other selectors are correctly specified to match the desired elements.
- If the node fails, check that the API key credential is valid and has the necessary permissions.
- When using code variables, ensure they are properly defined and passed to avoid errors.