Home > Mobile >  Very simple Jsoup crawler, how to get this line links??
Very simple Jsoup crawler, how to get this line links??

Time:12-06

Website: http://open.163.com/newview/movie/free? Pid=M9THK5V42 & amp; Mid=M9THL2UO9

Need to get video link, my code not

import java.io.IOException;

Import javax.mail. Lang. Model. The element. The element;

The import org. Jsoup. Jsoup;
The import org. Jsoup. Nodes. The Document;
The import org. Jsoup. Select. Elements;

Public class NewTest {

Public static void main (String [] args) {
//TODO Auto - generated method stub
Try {
The Document Document=Jsoup. Connect (" http://open.163.com/newview/movie/free? Pid=M9THK5V42 & amp; Mid=M9THL2UO9 "). The get ();
Elements of input=document. Select (" # __layout & gt; Div & gt; Div. M - main & gt; Div. M - main__videobox & gt; Div. Video - the module & gt; Div & gt; Div. Video - content> Div. Video - main ");

String videourl=input. TagName (" video "). The attr (the autoplay "SRC");
System. The out. Println (" nothing "+ videourl);
} the catch (IOException e) {
//TODO Auto - generated the catch block,
e.printStackTrace();
System. The out. Println (" connection ");
}

}

}

My results:

nothing
  • Related