0
我一直在試圖尋找一條線,並打印出來這個網站上線:現在它打印出網頁上的所有內容http://www.easports.com/player-hub/360/Its+McDoom代碼不能找到一個網站
,但我無法找到這一行我正在尋找。我想打印出「人對人的技能點數:1053」,但我不能找到像在控制檯東西。
我才真的希望它打印1行,而不是整個事情,但我甚至無法找到它。
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class ElectronicArtsStatHub {
/**
* @param args
*/
public static void main (String[] args) throws Exception{
URL oracle = new URL("http://www.easports.com/player-hub/360/Its+McDoom");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
in.close();
}
}
右一些有用的信息來源,我會看看那個HTMLUnit,thnx。 – Nick