一、使用 HttpClient 抓取网页数据 public String getHtml(String htmlurl) throws IOException { StringBuffer sb = new StringBuffer(); String acceptEncoding = ""; /* 1.生成 HttpClinet 对象并设置参数 */ HttpClient httpClient = new HttpClient(); GetMethod method = new GetMethod(htmlurl); int statusCode; try { status