How to print html source to console with phantomjs

耗尽温柔 提交于 2019-11-27 13:44:43

Spent some time to read the documentation, it should be obvious afterwards.

var page = require('webpage').create();
page.open('http://google.com', function () {
    console.log(page.content);
    phantom.exit();
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!