code: public String getPageHtml(String url) {
          HttpClient httpClient = new HttpClient();
          httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(2000);
          httpClient.getHttpConnectionManager().getParams().setSoTimeout(3000);
          GetMethod getMethod = new GetMethod(url);
          try {
              int statusCode = httpClient.executeMethod(getMethod);
              if (statusCode != HttpStatus.SC_OK) {
                  LOG.warn("HttpStatus not equal to 200, some problems may occurred:"
                          + getMethod.getStatusLine());
              }
              InputStream inputStream = getMethod.getResponseBodyAsStream();
              BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
              StringBuffer stringBuffer = new StringBuffer();
              String html = "";
              while ((html = br.readLine()) != null) {
                  stringBuffer.append(html);
              }
              return stringBuffer.toString();
          } catch (Exception e) {
              LOG.error("Error to get html of url=" + url + " due to " + e.getMessage());
              throw new RuntimeException("Get html failed, " + e.getMessage(), e);
          } finally {
              try {
                  getMethod.releaseConnection();
              } catch (Exception e2) {
                  // TODO: handle exception
              }
          }
      }
docs: 根据url抓取页面
  
  @param url
  url
  @return 页面html片段