diff --git a/pyspider/fetcher/phantomjs_fetcher.js b/pyspider/fetcher/phantomjs_fetcher.js index 24cff2142..520302d35 100644 --- a/pyspider/fetcher/phantomjs_fetcher.js +++ b/pyspider/fetcher/phantomjs_fetcher.js @@ -48,6 +48,9 @@ if (system.args.length !== 2) { // create and set page var page = webpage.create(); + page.onConsoleMessage = function(msg) { + console.log('console: ' + msg); + }; page.viewportSize = { width: fetch.js_viewport_width || 1024, height: fetch.js_viewport_height || 768*3