設置代理IP 設置完成后可發送抓取數據的請求
System.setProperty("http.maxRedirects", "50"); System.getProperties().setProperty("proxySet", "true"); // 如果不設置,只要代理IP和代理端口正確,此項不設置也可以 String ip = "11.184.192.49"; System.getProperties().setProperty("http.proxyHost", ip); System.getProperties().setProperty("http.proxyPort", "80");
免費的IP: http://www.xici.net.co/