Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Enable console.log in PhantomJS
Browse files Browse the repository at this point in the history
  • Loading branch information
xyb committed Nov 9, 2015
1 parent 942c12c commit e0f0cda
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyspider/fetcher/phantomjs_fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0f0cda

Please sign in to comment.