uw

url_washer

Pass in an url and get back the html cleansed of js..

Showing:

Popularity

Downloads/wk

3

Maintenance

No Maintenance Data Available

Package

Dependencies

4

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

url_washer

var wash =require('path/to/wash.js');
var washed = wash('someurl', someOptions);

wash returns a vow (Crockford's version) that promises to deliver html rendered by phantomjs after browsing someUrl.

If phantomjs is not on the path, you can pass in the path in options:

someOptions = 
{ phantomPath: 'path/to/phantomjs', 
  seoServer: 'seoServerUrl'}

You can also do

npm install phantomjs 

in the url_washer dir.

Or uncomment the phantomjs dependency in package.js, then:

node package.js
npm install

If wash can't find a phantomjs executable it will ask the seoServer (if set in options)

It will do an ajax call to http://seoServerUrl?url=someUrl, and expect html to be returned.

Finally:

washed.when(function(html) { 
   //send the html perhaps
},
function(err) {
  //no dice, you will have to send uncleansed html
})

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial