pub fn extract_meta_tags(
html_content: &str,
) -> Result<Vec<MetaTag>, MetadataError>
Expand description
Extracts meta tags from HTML content.
This function parses the given HTML content and extracts all meta tags,
including both name
and property
attributes.
§Arguments
html_content
- A string slice containing the HTML content to parse.
§Returns
Returns a Result
containing a Vec<MetaTag>
if successful, or a MetadataError
if parsing fails.
§Errors
This function will return a MetadataError
if:
- The HTML content cannot be parsed.
- The meta tag selector cannot be created.