Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mozilla/readability

Package Overview
Dependencies
Maintainers
14
Versions
7
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.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
126K
increased by2.12%
Maintainers
14
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 15 Dec 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc