peerigon / phridge

A bridge between node and PhantomJS
The Unlicense
519 stars 50 forks source link

How disable load images? #19

Closed Mikxail closed 9 years ago

Mikxail commented 9 years ago

I'll try phridge.spawn({'loadImages': false, 'loadimages': false, 'LoadImages': false, 'load-images': false, 'autoLoadImages': false, '--load-images': false}) But images loading.

jhnns commented 9 years ago

Mhmm ... I'm really just passing the object to PhantomJS and according to their documentation it should be called loadImages.

I'm also checking if the settings are correctly passed to PhantomJS in a unit test. You could try to run the unit tests via npm test on your machine to check if there is a problem.

Mikxail commented 9 years ago

I think that is trouble of phantomjs. I'll tried use phantomjs from command line with config file that contained

{'loadImages': false, 'loadimages': false, 'LoadImages': false, 'load-images': false, 'autoLoadImages': false, '--load-images': false}

and images loaded.

Then I'll tried use phantomjs with option --load-images=false and its work right - images doesn't loaded.

I suggest add second argument for phridge.spawn() that will be passed to spawn phantomjs process.

aju commented 9 years ago

You can always set it inside phantom - using run function. this.page = webpage.create(); this.page.settings.loadImages = false;

jhnns commented 9 years ago

I think @aju 's solution is the way to go.

This should be fixed by PhantomJS... there are already two issues at ariya/phantomjs#12265 and ariya/phantomjs#11776