Published on

Extract Article Content from any Website with Readability.js


These days websites are so cluttered with ads and do not provide good Readability.

That's why most browsers come up with an article reader feature which shows only the article so you can just focus on it.

Ever wondered to build something similar to that?

That's where Readability.js comes in.

It is used under the hood for Mozilla Firefox's Reader View.

Here is how to use it:


npm install @mozilla/readability
npm install jsdom


const { Readability } = require('@mozilla/readability');
const { JSDOM } = require('jsdom');

const url = '';

const main = async () => {
    const dom = await JSDOM.fromURL(url);
    const reader = new Readability(dom.window.document);
    const article = reader.parse();

Happy extracting article!