String url="http://list.youku.com/category/show/c_96_g_%E5%8A%A8%E4%BD%9C_s_1_d_1.html?spm=a2hmv.20009921.m_86982.5~5~5!3~1~3!4~A";//网址
Connection con=Jsoup.connect(url).header("User-Agent","Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2").timeout(10000);//头文件设置,一般固定
Document doc=con.get();//添加try catch跑出异常
Element div=doc.getElementsByAttributeValue("class", "box-series").first();//定位数据
Element ul=div.getElementsByAttributeValue("class", "panel").first();
Elements li=ul.select("li");
for(int i=0;i<li.size();i++){
String s=li.get(i).text().trim().toString();
System.out.println(s);
}
System.out.println("OK!");