finds.dev← search

// the find

luin/readability

★ 2,521 · HTML · updated Apr 2021

📚 Turn any web page into a clean view

A Node.js wrapper around arc90's readability algorithm that strips a web page down to its main article content, similar to what Safari Reader or Instapaper do. It uses jsdom for parsing and handles URL fetching, encoding conversion, and DOM cleanup in one call. Aimed at anyone building a read-later tool, content scraper, or article extractor in Node.

The GBK/GB2312 encoding support is a real differentiator — most readability ports ignore non-UTF-8 pages entirely. The `preprocess` hook is a clean escape hatch for filtering oversized pages or modifying source before parsing. Exposing the live jsdom document on the article object means you can do further DOM queries without re-parsing. Relative-to-absolute URL conversion is handled automatically, which is the tedious bit everyone forgets.

Abandoned since 2021 and pinned to an ancient version of jsdom — the modern jsdom has significant breaking API changes so this won't drop into a current Node project without pain. The callback-only API predates async/await by years; there is no Promise interface at all. Mozilla ships a maintained readability port (`@mozilla/readability`) that is actively used in Firefox Reader View and is the obvious alternative. The test fixtures are a handful of static HTML files with no mechanism to add new ones easily, so accuracy regressions on modern sites go undetected.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →