You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@mozilla/readability

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mozilla/readability

A standalone version of the readability library used for Firefox Reader View.

0.6.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created

What is @mozilla/readability?

@mozilla/readability is a library that extracts the main content from web pages, removing ads, sidebars, and other non-essential elements to provide a clean and readable version of the text. It is particularly useful for applications that need to display web content in a simplified format, such as reader modes in browsers or content extraction tools.

What are @mozilla/readability's main functionalities?

Extract Main Content

This feature allows you to extract the main content from a web page. The code sample demonstrates how to use JSDOM to load a web page and then use Readability to parse the document and extract the title and text content of the main article.

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

const url = 'https://example.com';

JSDOM.fromURL(url).then(dom => {
  const reader = new Readability(dom.window.document);
  const article = reader.parse();
  console.log(article.title);
  console.log(article.textContent);
});

Other packages similar to @mozilla/readability

FAQs

Package last updated on 03 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts