MimiipProxyListPageParser implements ProxyListPageParser { @Override public List<Proxy> parse(String hmtl) { Document document = Jsoup.parse(hmtl); Elements elements = document.select("table[class=list] tr"); List<Proxy> proxyList = new ArrayList<>(elements.size()); for (int i = 1; i < elements.size(); i++){ String isAnonymous = elements.get(i).select("td:eq(3)").first().text(); if(!anonymousFlag || isAnonymous.contains("匿")){ String ip = elements.get(i).select("td:eq(0)").first().text(); String port = elements.get(i).select("td:eq(1)").first().text(); proxyList.add(new Proxy(ip, Integer.valueOf(port), Constants.TIME_INTERVAL)); } } return proxyList; }  @Override List<Proxy> parse(String hmtl);  }
@Test public void parse() throws ExecutionException, InterruptedException { SimpleHttpClient simpleHttpClient = new SimpleHttpClient(null); String r = simpleHttpClient.get("http: MimiipProxyListPageParser pageParser = new MimiipProxyListPageParser(); List<Proxy> proxyList =pageParser.parse(r); }