많은 자바 스크립트로 웹 사이트를 구문 분석하려고하는 것처럼 들립니다. phontom을 사용하여 사용자 동작을 시뮬레이션 할 수 있습니다. 노드를 사용하려고한다고 가정하십시오. 그런 다음 Node-Phontom을 사용하면됩니다.
var phantom=require('node-phantom');
phantom.create(function(err,ph) {
return ph.createPage(function(err,page) {
return page.open("you/url/", function(err,status) {
console.log("opened site? ", status);
page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {
//jQuery Loaded.
//Settimeout to wait for a bit for AJAX call.
setTimeout(function() {
return page.evaluate(function() {
//Get what you want from the page
//e.g. localStorage.getItem('xxx');
}, 5000);
});
});
});
});
Here is phontom.
Here is node-phontom.