StructuredDataExtractor class

Utility class for extracting structured data from HTML

Constructors

StructuredDataExtractor({Logger? logger})
Creates a new StructuredDataExtractor

Properties

hashCode → int
The hash code for this object.
no setterinherited
logger → Logger?
Logger for logging operations
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

extractAll(String html) → List<StructuredDataExtractionResult>
Extracts all structured data from HTML
extractArticles(String html) → List<Map<String, dynamic>>
Extracts all article information from the HTML
extractAsSchema(String html, String schemaType, {List<StructuredDataType> preferredTypes = const [StructuredDataType.jsonLd, StructuredDataType.microdata, StructuredDataType.rdfa]}) → Map<String, dynamic>?
Extracts structured data and converts it to a specific schema
extractByType(String html, StructuredDataType type) → List<StructuredDataExtractionResult>
Extracts structured data of a specific type
extractJsonLd(String html) → List<StructuredDataExtractionResult>
Extracts JSON-LD data from HTML
extractMicrodata(String html) → List<StructuredDataExtractionResult>
Extracts Microdata from HTML
extractOpenGraph(String html) → List<StructuredDataExtractionResult>
Extracts Open Graph data from HTML
extractProducts(String html) → List<Map<String, dynamic>>
Extracts all product information from the HTML
extractRdfa(String html) → List<StructuredDataExtractionResult>
Extracts RDFa data from HTML
extractTwitterCard(String html) → List<StructuredDataExtractionResult>
Extracts Twitter Card data from HTML
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited