Magpie HTML - v0.1.3
    Preparing search index...

    Function isProbablyReaderable

    • Check if HTML content is probably readerable.

      Parameters

      • doc: Document

        Pre-parsed Document to check

      • Optionaloptions: { minContentLength?: number; minScore?: number }

        Readability check options

      Returns boolean

      True if content appears to be an article

      Quick check to determine if content extraction is likely to succeed. This is a heuristic check and may produce false positives/negatives.

      import { parseHTML } from '../utils/html-parser.js';

      const doc = parseHTML(html);
      if (isProbablyReaderable(doc)) {
      const result = extractContent(doc);
      }