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