var webpage = require('webpage').create();
webpage
.open('http://example.com')
.then(function(){
var someContent = webpage.evaluate(function () {
return document.querySelector("#aDiv").textContent;
});
console.log(someContent);
});
It is called once, but my web page is dynamically changing. How can I intercept every change?
答案 0 :(得分:0)
如果由于ajax调用而改变,你应该使用onResourceReceived来观察变化