WebClient webClient = new WebClient(BrowserVersion.FIREFOX_38,ip,port);webClient.getOptions().setJavaScriptEnabled(true);webClient.getOptions().setCssEnabled(false);webClient.setAjaxController(new NicelyResynchronizingAjaxController());webClient.getOptions().setTimeout(15000); webClient.getOptions().setThrowExceptionOnScriptError(false);webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);webClient.addRequestHeader("Referer", "http://www.hao123.com");HtmlPage rootPage= webClient.getPage(url);
- 2 回答
- 0 关注
- 1570 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消