Socket
Socket
Sign inDemoInstall

node-readability

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-readability - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

.npmignore

1

examples/simple.js
var readability = require('../src/readability')
, fs = require('fs')

@@ -4,0 +3,0 @@ // uncoment the following line to print the debug info to console.

{
"name": "node-readability",
"version": "0.0.5",
"version": "0.0.6",
"author": "Zihua Li",

@@ -11,2 +11,5 @@ "description": "Turning any web page into a clean view.",

},
"scripts": {
"test": "./node_modules/mocha/bin/mocha"
},
"main": "./src/readability",

@@ -23,6 +26,12 @@ "licenses": [

},
"engines": ["node >=0.5.10"],
"engines": [
"node >=0.5.10"
],
"keywords": [
"readability"
]
],
"devDependencies": {
"mocha": "~1.8.2",
"should": "~1.2.2"
}
}

@@ -9,6 +9,2 @@ # node-readability

## Requirements
* [jsdom](https://github.com/tmpvar/jsdom)
* [fetch](https://github.com/andris9/fetch)
## Usage

@@ -49,3 +45,3 @@

* **cookieJar** for sharing cookies between requests, see below
* **outputEncoding**
* **outputEncoding**
* **disableDecoding** set to true to disable automatic charset decoding to utf-8

@@ -52,0 +48,0 @@ * **overrideCharset** set input encoding

@@ -431,3 +431,3 @@ // All of the regular expressions in use within readability.

for (var ei = 0, il = embeds.length; ei < il; ei++) {
if (embeds[ei].src.search(regexps.videoRe) == -1) {
if (embeds[ei].src && embeds[ei].src.search(regexps.videoRe) == -1) {
embedCount++;

@@ -434,0 +434,0 @@ }

@@ -1,4 +0,4 @@

var jsdom = require('jsdom'),
fetchUrl = require('fetch').fetchUrl,
helpers = require('./helpers');
var jsdom = require('jsdom');
var fetchUrl = require('fetch').fetchUrl;
var helpers = require('./helpers');

@@ -11,3 +11,3 @@ exports.debug = function (debug) {

function Readablity(document) {
function Readability(document) {
this._document = document;

@@ -27,3 +27,3 @@ this.iframeLoads = 0;

Readablity.prototype.getContent = function () {
Readability.prototype.getContent = function () {
if (typeof this.cache['article-content'] !== 'undefined') {

@@ -45,3 +45,3 @@ return this.cache['article-content'];

Readablity.prototype.getTitle = function () {
Readability.prototype.getTitle = function () {
if (typeof this.cache['article-title'] !== 'undefined') {

@@ -71,7 +71,7 @@ return this.cache['article-title'];

Readablity.prototype.getDocument = function () {
Readability.prototype.getDocument = function () {
return this._document;
};
Readablity.prototype.getHTML = function () {
Readability.prototype.getHTML = function () {
return this._document.getElementsByTagName('html')[0].innerHTML;

@@ -101,7 +101,4 @@ };

done: function (errors, window) {
try {
callback(null, new Readablity(window.document, options));
} catch (e) {
callback(e);
}
if (errors) return callback(errors);
callback(null, new Readability(window.document, options));
}

@@ -108,0 +105,0 @@ });

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