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

Commit 60dc0da

Browse files
committed
Merge pull request #327 from xyb/phantomjs_log
Enable console.log in PhantomJS
2 parents 942c12c + e0f0cda commit 60dc0da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyspider/fetcher/phantomjs_fetcher.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ if (system.args.length !== 2) {
4848

4949
// create and set page
5050
var page = webpage.create();
51+
page.onConsoleMessage = function(msg) {
52+
console.log('console: ' + msg);
53+
};
5154
page.viewportSize = {
5255
width: fetch.js_viewport_width || 1024,
5356
height: fetch.js_viewport_height || 768*3

0 commit comments

Comments
 (0)