Comparing version 0.2.1 to 1.0.0
@@ -1,47 +0,41 @@ | ||
// Generated by CoffeeScript 1.6.2 | ||
(function() { | ||
module.exports = function(req, callback) { | ||
var async, candidates, htmlparser, http, obj, parser, path, url; | ||
htmlparser = require("htmlparser2"); | ||
parser = new htmlparser.Parser({ | ||
onopentag: function(name, attr) { | ||
if (name === "link" && attr.type === "application/rss+xml") { | ||
return candidates.push(attr); | ||
} | ||
// Generated by CoffeeScript 1.6.3 | ||
module.exports = function(req, callback) { | ||
var async, candidates, htmlparser, http, obj, parser, path, url; | ||
htmlparser = require("htmlparser2"); | ||
parser = new htmlparser.Parser({ | ||
onopentag: function(name, attr) { | ||
if (name === "link" && attr.type === "application/rss+xml" || attr.type === "application/atom+xml") { | ||
return candidates.push(attr); | ||
} | ||
} | ||
}); | ||
async = require('async'); | ||
url = require('url'); | ||
path = require('path'); | ||
http = require('http'); | ||
candidates = []; | ||
obj = url.parse(req); | ||
return http.get(obj.href, function(res) { | ||
var body; | ||
body = ""; | ||
res.on('data', function(chunk) { | ||
return body += chunk; | ||
}); | ||
async = require('async'); | ||
url = require('url'); | ||
path = require('path'); | ||
http = require('http'); | ||
candidates = []; | ||
obj = url.parse(req); | ||
return http.get({ | ||
host: obj.host, | ||
port: obj.port | ||
}, function(res) { | ||
var body; | ||
body = ""; | ||
res.on('data', function(chunk) { | ||
return body += chunk; | ||
return res.on('end', function() { | ||
parser.write(body); | ||
parser.end(); | ||
return async.forEach(candidates, function(cand, cb) { | ||
if (cand.href.match(/[http|https]:\/\//)) { | ||
cand.url = cand.href; | ||
} else { | ||
cand.url = "" + obj.protocol + "//" + obj.host + cand.href; | ||
} | ||
return cb(); | ||
}, function() { | ||
return callback(null, candidates); | ||
}); | ||
return res.on('end', function() { | ||
parser.write(body); | ||
parser.end(); | ||
return async.forEach(candidates, function(cand, cb) { | ||
if (cand.href.match(/[http|https]:\/\//)) { | ||
cand.url = cand.href; | ||
} else { | ||
cand.url = "" + obj.protocol + "//" + obj.host + cand.href; | ||
} | ||
return cb(); | ||
}, function() { | ||
return callback(candidates); | ||
}); | ||
}); | ||
}); | ||
}; | ||
}).call(this); | ||
}).on('error', function(e) { | ||
return callback(e, null); | ||
}); | ||
}; |
{ | ||
"name": "find-rss", | ||
"description": "find rss feeds", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"author": "nikezono", | ||
"dependencies": { | ||
"feedparser": "*", | ||
"underscore": "*", | ||
"async": "*", | ||
@@ -8,0 +10,0 @@ "htmlparser2": "*" |
node-find-rss | ||
--- | ||
[![Build Status](https://travis-ci.org/nikezono/node-find-rss.png)](https://travis-ci.org/nikezono/node-find-rss) | ||
find rss feeds in url | ||
@@ -21,3 +23,4 @@ | ||
finder = require 'find-rss' | ||
finder "http://www.apple.com/",(candidates)-> | ||
finder "http://www.apple.com/",(error,candidates)-> | ||
console.log error if error | ||
console.log candidates | ||
@@ -24,0 +27,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 2 instances 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4963
8
1
33
4
41
5
+ Addedfeedparser@*
+ Addedunderscore@*
+ Addedaddressparser@1.0.1(transitive)
+ Addedarray-indexofobject@0.0.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedfeedparser@2.2.10(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedlodash.assign@4.2.0(transitive)
+ Addedlodash.get@4.4.2(transitive)
+ Addedlodash.has@4.5.2(transitive)
+ Addedlodash.uniq@4.5.0(transitive)
+ Addedmri@1.2.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedunderscore@1.13.7(transitive)
+ Addedutil-deprecate@1.0.2(transitive)