Hello! It was required to do in screenshots of sites on pkhp. Installed on Ubuntu phantomjs.
I wrote the script:
system = require('system'); var url = system.args[1]; var filename = system.args[2]; var WebPage = require('webpage'); page = WebPage.create(); page.open(url); page.onLoadFinished = function() { page.render(filename + '.png'); phantom.exit(); } Call the script:
phantomjs phantomsave.js https://www.yandex.ru 331 Everything saves correctly. Calling for another site:
phantomjs phantomsave.js https://www.google.ru 331 It creates a picture weighing 1 kb. Is empty. And the main thing for the desired site is the same. What could be the problem?