
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
parserproxy
Advanced tools
This module acts as a proxy that fetches an RSS/Atom/RDF or OPML url that you request, parses it -- using node-feedparser or node-opmlparser -- and responds with the parsed JSON representation of the RSS/Atom/RDF or OPML you requested.
This module was created so that I could easily transform what is frequently a time-intensive, blocking operation -- i.e., XML parsing -- into an I/O operation (in a separate process, maybe on another server), which means the parsing will no longer be blocking.
Via npm:
npm install parserproxy
Manually: (A fine idea if you're not going to use in programatically in your node.js program)
git clone git://github.com/danmactough/node-parserproxy.git parserproxy
$ cd parserproxy
$ node server.js
Then in your node app:
var request = require('request');
request({ uri : 'http://localhost:3030/parseFeed',
body : { url: 'http://cyber.law.harvard.edu/rss/examples/rss2sample.xml' },
json : true },
function (err, response, body){
if (!err && response.statusCode == 200) {
console.log('%s [%s]', body.meta.title || body.meta.xmlUrl, body.meta.link);
body.articles.forEach(function (article) {
console.log('%s - %s', article.pubDate, article.title || article.description.substring(0,50));
});
}
});
var parserproxy = require('parserproxy')
, forever = require('forever')
, request = require('request');
forever.start(parserproxy).on('start', function (process, data){
// It takes a few milliseconds for the http server to spin up, so for the purposes of this
// example, we wrap the request in a setTimeout(). You DON'T need to do this in your code unless
// you are going to make one or more requests immediately upon start up.
setTimeout(function(){
request({ uri : 'http://localhost:3030/parseFeed',
body : { url: 'http://scripting.com/rss.xml' },
json : true },
function (err, response, body){
if (!err && response.statusCode == 200) {
console.log('%s [%s]', body.meta.title || body.meta.xmlUrl, body.meta.link);
body.articles.forEach(function (article) {
console.log('%s - %s', article.pubDate, article.title || article.description.substring(0,50));
});
}
});
}, 1000);
});
Obviously, a pluggable memcache-like ability would be great. Pull requests always welcome. :-)
(The MIT License)
Copyright (c) 2011 Dan MacTough <danmactough@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A JSON-over-HTTP proxy for node-feedparser and node-opmlparser
The npm package parserproxy receives a total of 9 weekly downloads. As such, parserproxy popularity was classified as not popular.
We found that parserproxy 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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.