Open showwell0120 opened 7 years ago
I want to disable the behaviors such as displaying ads mask in webpage (e.g. https://www.thestreet.com/story/14103442/1/credit-suisse-plans-4-billion-capital-increase-will-keep-domestic-business-in-house.html). When I test page.settings.javascriptEnabled = false using command line, it works. Just like this- test.js:
page.settings.javascriptEnabled = false
var page = require('webpage').create(); page.settings.javascriptEnabled = true; page.open('https://www.thestreet.com/story/14103442/1/credit-suisse-plans-4-billion-capital-increase-will-keep-domestic-business-in-house.html', function() { page.render('thestreet.png'); phantom.exit(); });
command line: phantomjs test.js
But when I add this setting in webshot.phantom.js, it would crash. Can somebody have any idea with it?
webshot.phantom.js
I want to disable the behaviors such as displaying ads mask in webpage (e.g. https://www.thestreet.com/story/14103442/1/credit-suisse-plans-4-billion-capital-increase-will-keep-domestic-business-in-house.html). When I test
page.settings.javascriptEnabled = false
using command line, it works. Just like this- test.js:command line: phantomjs test.js
But when I add this setting in
webshot.phantom.js
, it would crash. Can somebody have any idea with it?