detectContent method

ContentDetectionResult detectContent(
  1. String html
)

Detects the main content area of a webpage

Implementation

ContentDetectionResult detectContent(String html) {
  try {
    final document = html_parser.parse(html);
    return _detectContentInDocument(document);
  } catch (e) {
    logger?.error('Error detecting content: $e');
    return ContentDetectionResult.empty();
  }
}