提前感谢大家。
我正在使用Jaxer.sandbox,请求也很好。我希望这些请求通过我的http代理(比如squid )。这是目前为我工作的代码。
window.onload = function() {
//the url to scrape
var url = "http://www.cnn.com/";
//our sandboxed browser
var sandbox = new Jaxer.Sandbox();
//open optons
var openOptions = new Jaxer.Sandbox.OpenOptions();
openOptions.allowJavaScript = false;
openOptions.allowMetaRedirects = false;
openOptions.allowSubFrames = false;
openOptions.allowSubFrames = false;
openOptions.onload = function() {
//do something onload
};
//make the call
sandbox.open(url, null, openOptions);
//write the response
Jaxer.response.setContents(sandbox.toHTML());
};如何通过代理服务器发送此请求?
谢谢,
雷扎。
发布于 2010-03-16 11:40:53
我没有收到任何回复。:
我们最终在jaxer框架中创建了自己的自定义sandbox.openProxy()方法,从而解决了这一问题。:)
雷扎。
https://stackoverflow.com/questions/2441137
复制相似问题