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

Commit

Permalink
Merge pull request #327 from xyb/phantomjs_log
Browse files Browse the repository at this point in the history
Enable console.log in PhantomJS
  • Loading branch information
binux committed Nov 9, 2015
2 parents 942c12c + e0f0cda commit 60dc0da
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 60dc0da

Please sign in to comment.