Product
Introducing Ruby Support in Socket
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
node-readability
Advanced tools
Turn any web page into a clean view. This module is based on arc90's readability project.
npm install node-readability
read(html [, options], callback)
Where
callback(error, article)
Example
var read = require('node-readability');
read('http://howtonode.org/really-simple-file-uploads', function(err, article) {
// The main body of the page.
console.log(article.content);
// The title of the page.
console.log(article.title);
// The raw HTML code of the page
console.log(article.html);
// The document object of the page
console.log(article.document);
});
NB If the page has been marked with charset other than utf-8, it will be converted automatically. Charsets such as GBK, GB2312 is also supported.
node-readability will pass the options to fetch directly.
Possible option values
{'Header-Field':'value'}
Infinity
['name=val']
The article content of the web page. Return false
if failed.
The article title of the web page. It's may not same to the text in the <title>
tag.
The original html of the web page.
The document of the web page generated by jsdom. You can use it to access the DOM directly(for example, article.document.getElementById('main')
).
https://github.com/luin/node-readability/graphs/contributors
This code is under the Apache License 2.0. http://www.apache.org/licenses/LICENSE-2.0
FAQs
Turning any web page into a clean view.
The npm package node-readability receives a total of 416 weekly downloads. As such, node-readability popularity was classified as not popular.
We found that node-readability demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.