【发布时间】:2014-12-26 11:30:20
【问题描述】:
我想用 nodejs 和 phantomjs 控制台记录网页的内容。这是我的代码:
var phantom = require('phantom');
phantom.create(function(ph) {
return ph.createPage(function(page) {
return page.open("http://zehinz.com/test.html", function(status) {
if (status === 'success') {
//console.log the content of page with Javascript executed ???
} else {
console.log('some error');
ph.exit();
}
});
});
});
如何输出动态呈现的网页内容?
【问题讨论】:
标签: javascript node.js phantomjs screen-scraping