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

find-rss

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-rss - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

.travis.yml

80

lib/find-rss.js

@@ -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

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