0.2.11 • Published 10 years ago

url_washer v0.2.11

Weekly downloads
9
License
-
Repository
github
Last release
10 years ago

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
})
0.2.11

10 years ago

0.2.10

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago