metascraper-defuddle
v5.56.2
Published
Metascraper connector powered by Defuddle for cleaner article content extraction.
Downloads
2,944
Maintainers
Readme
Install
$ npm install metascraper-defuddle --saveUsage
const metascraper = require('metascraper')([require('metascraper-defuddle')()])It runs a single Defuddle parseInternal pass — not the high-level Defuddle(), whose parse() re-runs on low wordCount to recover content. This connector extracts metadata, which is read from meta tags/schema regardless of content removals, so those retries add nothing here.
The Defuddle result is memoized by HTML, so the same page is defuddled once even when several rules (or another consumer, such as a markdown renderer) request it; the same URL re-fetched with different HTML still re-extracts.
Options
require('metascraper-defuddle')({ preprocess, defuddleOpts })- preprocess
(document, html) => void— mutate the parsed DOM before extraction (e.g. strip noise, normalize flattened shadow-DOM content). - defuddleOpts
object— options forwarded to Defuddle'sparseInternal(e.g.{ removeLowScoring: false }to keep link-heavy blocks).
License
metascraper-defuddle © Microlink, released under the MIT License. Authored and maintained by Microlink with help from contributors.
microlink.io · GitHub microlinkhq · X @microlinkhq
