Comparing version 1.4.2 to 1.4.3
@@ -13,3 +13,3 @@ /** | ||
request = require('request'), | ||
// read = require('node-readability'), | ||
// read = require('node-readability'), | ||
iconv = require('iconv-lite'), | ||
@@ -34,3 +34,3 @@ es = require('event-stream'), | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function(resolve, reject) { | ||
var posts, encoding; | ||
@@ -51,3 +51,3 @@ var req = request(url, { | ||
req.on('response', function (res) { | ||
req.on('response', function(res) { | ||
var stream = this; | ||
@@ -61,3 +61,3 @@ posts = []; | ||
}).pipe(es.through(function (data) { | ||
}).pipe(es.through(function(data) { | ||
@@ -72,3 +72,3 @@ //get charset from <?xml version="1.0" encoding="gb2312"?><rss version="2.0"> | ||
meta = meta[0].toString().match(/encoding="(.*?)"\?>/g); | ||
encoding = meta.toString().split('"')[1]; | ||
encoding = meta && meta.toString().split('"')[1]; | ||
} | ||
@@ -88,3 +88,3 @@ | ||
feedparser.on('end', function (err) { | ||
feedparser.on('end', function(err) { | ||
if (err) { | ||
@@ -96,3 +96,3 @@ reject(err); | ||
feedparser.on('readable', function () { | ||
feedparser.on('readable', function() { | ||
while (post = this.read()) { | ||
@@ -115,3 +115,3 @@ var post = _.pick(post, options); | ||
options = options || siteInfoOption; | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function(resolve, reject) { | ||
var rss, encoding; | ||
@@ -130,3 +130,3 @@ var req = request(url, { | ||
req.on('error', reject); | ||
req.on('response', function (res) { | ||
req.on('response', function(res) { | ||
var stream = this; | ||
@@ -138,3 +138,3 @@ if (res.statusCode !== 200) { | ||
// stream.pipe(feedparser); | ||
}).pipe(es.through(function (data) { | ||
}).pipe(es.through(function(data) { | ||
@@ -158,3 +158,3 @@ //get charset from <?xml version="1.0" encoding="gb2312"?><rss version="2.0"> | ||
feedparser.on('error', reject); | ||
feedparser.on('end', function (err) { | ||
feedparser.on('end', function(err) { | ||
if (err) { | ||
@@ -165,3 +165,3 @@ reject(err); | ||
}); | ||
feedparser.on('readable', function () { | ||
feedparser.on('readable', function() { | ||
var post; | ||
@@ -222,5 +222,5 @@ if (post = this.read()) { | ||
siteInfo: siteInfo | ||
//fetchAllContent: fetchAllContent, | ||
//getCleanBody: getCleanBody, | ||
//getAllByUrl: getAllByUrl | ||
//fetchAllContent: fetchAllContent, | ||
//getCleanBody: getCleanBody, | ||
//getAllByUrl: getAllByUrl | ||
}; |
{ | ||
"name": "rssspider", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"author": "Liu Xing <shanelau1021@gmail.com> (http://kissliux.github.io)", | ||
@@ -5,0 +5,0 @@ "description": "The simplest way to use rssspide to fetch rss list and site info. Fetch post'content ,give clean view to you. ", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10968