All,
Using JSDOM as follows:
var config = {
features: {
FetchExternalResources : ["script", "img", "css", "frame", "iframe", "link"],
ProcessExternalResources: true
}
};
jsdom.env({
url:url,
//config:config,
done: function(errors, window) {
//var $ = window.$;
console.dir(window);
console.log(window.document.innerHTML);
var juice = require('juice');
var options = {
url:url
};
juice.juiceContent(window.document.innerHTML, options, function(err, result) {
if(err) console.log(err);
console.log(result);
res.send(result);
});
//res.send(window.document.innerHTML);
}
});
I.e I am making a little page that can view other external websites. I can see that there is an attempt to load the images , however the URL that is prefixed should be the URL and not the url of the actual page (i.e the external URL not the Internal one).
Is there anyway to fix/modify/configure ?
Thanks
Avron